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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user