Back to index

plt-scheme  4.2.1
Functions
Directory.cc File Reference
#include "wx.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

Go to the source code of this file.

Functions

Bool wxDirExists (char *dir)
Bool wxFileExists (char *filename)
Bool wxRemoveFile (char *file)

Function Documentation

Bool wxDirExists ( char *  dir)

Definition at line 33 of file Directory.cc.

{
    struct stat sbuf;
    return ((stat(dir, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE);
}

Here is the caller graph for this function:

Bool wxFileExists ( char *  filename)

Definition at line 39 of file Directory.cc.

{
    struct stat stbuf;

    return (filename && !stat((char *)filename, &stbuf));
}

Here is the caller graph for this function:

Bool wxRemoveFile ( char *  file)

Definition at line 46 of file Directory.cc.

{
    return !unlink(file);
}