CryEngine.FileSystem.Directory

CryEngine.FileSystem.Directory

The Directory class is used to easily access folders on the disk or in .pak files. More...

Static Public Member Functions

static bool Exists (string path)
Checks if the directory at the specified path exists on disk or in a .pak file. Empty directories are not included in .pak files and will always return false. More...
static IEnumerable< string > EnumerateFiles (string path, string searchPattern="*.*")
Enumerates over all the files in the specified directory on the disk or in a .pak file. The search pattern can be used to filter for specific files. If the directory does not exists this will throw an FileNotFoundException. Please note that empty directories in a .pak file will also throw an FileNotFoundException. More...

Detailed Description

The Directory class is used to easily access folders on the disk or in .pak files.

Member Function Documentation

◆ EnumerateFiles()

static IEnumerable CryEngine.FileSystem.Directory.EnumerateFiles ( string path,
string searchPattern = "*.*"
)
inline
static

Enumerates over all the files in the specified directory on the disk or in a .pak file. The search pattern can be used to filter for specific files. If the directory does not exists this will throw an FileNotFoundException. Please note that empty directories in a .pak file will also throw an FileNotFoundException.

Returns
Enumerable of all the files in the directory.
Parameters
pathPath to the directory.
searchPatternSearch pattern to filter the files with.

◆ Exists()

static bool CryEngine.FileSystem.Directory.Exists ( string path)
inline
static

Checks if the directory at the specified path exists on disk or in a .pak file. Empty directories are not included in .pak files and will always return false.

Returns
true, if the directory exists, false otherwise.
Parameters
pathPath to the directory.