libite
Functions
fexist.c File Reference
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include "lite.h"
Include dependency graph for fexist.c:

Functions

int fexist (const char *file)
 Check if a file exists in the file system. More...
 
int fexistf (const char *fmt,...)
 Like fexist() but with formatted string support. More...
 

Detailed Description

Author
Claudio Matsuoka
Date
2008

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).

◆ 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).