File Operations


class FileSystem

#include "FileSystem.h"

The FileSystem class provides static methods for:

Methods

static bool FileExists(const string & path);

Returns true if the specified file exists, and false otherwise.

static bool DirectoryExists(const string & path);

Returns true if the specified directory exists, and false otherwise.

static int CompareFileTimestamps(const string & file1, const string & file2);

Compares the last modification times of file1 and file2. Returns one of the following values:

If either file1 or file2 does not exist, a CS240Exception is thrown.


Ken Rodham