From Ken Sewel, added osgDB::fileType(filename) method and usage of this

new function in osgdem to automatcally handle directories as part of the
regular -d and -t options.
This commit is contained in:
Robert Osfield
2004-05-08 06:35:32 +00:00
parent f35cafb778
commit 3d3199017e
3 changed files with 102 additions and 40 deletions

View File

@@ -29,10 +29,19 @@ enum CaseSensitivity
CASE_INSENSITIVE,
};
enum FileType
{
FILE_NOT_FOUND,
REGULAR_FILE,
DIRECTORY,
};
/** return true if a file exisits. */
extern OSGDB_EXPORT bool fileExists(const std::string& filename);
/** return type of file. */
extern OSGDB_EXPORT FileType fileType(const std::string& filename);
/** find specified file in specified file path.*/
extern OSGDB_EXPORT std::string findFileInPath(const std::string& filename, const FilePathList& filePath,CaseSensitivity caseSensitivity=CASE_SENSITIVE);