Add support for Valve search paths to GetFileSize native (bug 5931, r=asherkin).

This commit is contained in:
Nicholas Hastings
2014-01-07 14:24:53 -05:00
parent 310f77d96a
commit ad5740f8a7
4 changed files with 26 additions and 5 deletions
+8 -4
View File
@@ -303,9 +303,9 @@ native FilePosition(Handle:file);
*
* @param path Path to the file.
* @param use_valve_fs If true, the Valve file system will be used instead.
* This can be used to check for the existance of files
* inside GCFs or the game cache, rather than solely files
* that are on disk.
* This can be used to find files existing in any of
* the GAME search paths, rather than solely files
* existing directly in the gamedir.
* @return True if the file exists, false otherwise.
*/
native bool:FileExists(const String:path[], bool:use_valve_fs=false);
@@ -331,9 +331,13 @@ native bool:DirExists(const String:path[]);
* Get the file size in bytes.
*
* @param path Path to the file.
* @param 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 GAME search paths, rather than solely files
* existing directly in the gamedir.
* @return File size in bytes, -1 if file not found.
*/
native FileSize(const String:path[]);
native FileSize(const String:path[], bool:use_valve_fs=false);
/**
* Flushes a file's buffered output; any buffered output