From Chris Hanson, " Add support for requesting and setting the current directory (a la getcwd/chdir) via a

C++-friendly string-class API.

 Prevent osgDB::concatPaths from faulting if the supplied "left" path string is empty."
This commit is contained in:
Robert Osfield
2009-11-23 10:19:37 +00:00
parent 87452fe1b9
commit d09323f93e
3 changed files with 56 additions and 1 deletions

View File

@@ -40,6 +40,12 @@ extern OSGDB_EXPORT bool makeDirectory( const std::string &directoryPath );
// Make a new directory for a given file.
extern OSGDB_EXPORT bool makeDirectoryForFile( const std::string &filePath );
// Get current working directory.
extern OSGDB_EXPORT std::string getCurrentWorkingDirectory( void );
// Set current working directory.
extern OSGDB_EXPORT bool setCurrentWorkingDirectory( const std::string &newCurrentWorkingDirectory );
/** return true if a file exists. */
extern OSGDB_EXPORT bool fileExists(const std::string& filename);
@@ -90,7 +96,7 @@ inline FilePathList& getLibraryFilePathList() { return osgDB::Registry::instance
extern OSGDB_EXPORT std::string findLibraryFile(const std::string& filename,CaseSensitivity caseSensitivity=CASE_SENSITIVE);
/** convert a string containing a list of paths delimited either with ';' (Windows) or ':' (All other platforms) into FilePath representation.*/
/** convert a string containing a list of paths delimited either with ';' (Windows) or ':' (All other platforms) into FilePath representation.*/
extern OSGDB_EXPORT void convertStringPathIntoFilePathList(const std::string& paths,FilePathList& filepath);
extern OSGDB_EXPORT void appendPlatformSpecificLibraryFilePaths(FilePathList& filepath);