libite 2.6.1
fexist.c File Reference
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include "lite.h"

Go to the source code of this file.

Functions

int fexist (const char *file)
 
int fexistf (const char *fmt,...)
 

Detailed Description

Author
Claudio Matsuoka
Date
2008

Definition in file fexist.c.

Function Documentation

◆ fexist()

int fexist ( const char * file)

Check if a file exists in the file system.

Parameters
fileFile to look for, with full path.
Returns
TRUE(1) if the file exists, otherwise FALSE(0).

Definition at line 45 of file fexist.c.

◆ fexistf()

int fexistf ( const char * fmt,
... )

Like fexist() but with formatted string support

Parameters
fmtFormatted string to be composed into the file to look for.

This is a wrapper for the fexist() function in lite.h, lessening the burden of having to compose the filename from parts in a seprate buffer.

Returns
TRUE(1) if the file exists, otherwise FALSE(0).

Definition at line 68 of file fexist.c.