OpenDirectory

Last Updated2014-11-19
Created At2007-01-01

Opens a directory/folder for contents enumeration.

Notes

Directories are closed with CloseHandle() or delete.

Directories Handles can be cloned.

OpenDirectory() supports the "file://" notation.

native DirectoryListing OpenDirectory(const char[] path, bool use_valve_fs = false, const char[] valve_path_id = "GAME")

Parameters

const char[] path
Path to open.
bool use_valve_fs
If true, the Valve file system will be used instead. This can be used to find files existing in any of the Valve search paths, rather than solely files existing directly in the gamedir.
const char[] valve_path_id
If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths.

Return Value

DirectoryListing A Handle to the directory, null on error.