Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FileUtils File Reference

#include <osgDB/Registry>
#include <vector>
#include <deque>
#include <string>

Namespaces

namespace  osgDB

Defines

#define OSGDB_FILEUTILS   1

Typedefs

typedef std::vector< std::string > DirectoryContents

Enumerations

enum  CaseSensitivity { CASE_SENSITIVE, CASE_INSENSITIVE }
enum  FileType { FILE_NOT_FOUND, REGULAR_FILE, DIRECTORY }

Functions

OSGDB_EXPORT bool makeDirectory (const std::string &directoryPath)
OSGDB_EXPORT bool makeDirectoryForFile (const std::string &filePath)
OSGDB_EXPORT bool fileExists (const std::string &filename)
OSGDB_EXPORT FileType fileType (const std::string &filename)
OSGDB_EXPORT std::string findFileInPath (const std::string &filename, const FilePathList &filePath, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT std::string findFileInDirectory (const std::string &fileName, const std::string &dirName, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT DirectoryContents getDirectoryContents (const std::string &dirName)
void setDataFilePathList (const FilePathList &filepath)
void setDataFilePathList (const std::string &paths)
FilePathListgetDataFilePathList ()
OSGDB_EXPORT std::string findDataFile (const std::string &filename, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT std::string findDataFile (const std::string &filename, const ReaderWriter::Options *options, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
void setLibraryFilePathList (const FilePathList &filepaths)
void setLibraryFilePathList (const std::string &paths)
FilePathListgetLibraryFilePathList ()
OSGDB_EXPORT std::string findLibraryFile (const std::string &filename, CaseSensitivity caseSensitivity=CASE_SENSITIVE)
OSGDB_EXPORT void convertStringPathIntoFilePathList (const std::string &paths, FilePathList &filepath)
OSGDB_EXPORT void appendPlatformSpecificLibraryFilePaths (FilePathList &filepath)

Define Documentation

#define OSGDB_FILEUTILS   1
 


Typedef Documentation

typedef std::vector<std::string> osgDB::DirectoryContents
 

simple list of names to represent a directory's contents.


Enumeration Type Documentation

enum osgDB::CaseSensitivity
 

Enumeration values:
CASE_SENSITIVE 
CASE_INSENSITIVE 

enum osgDB::FileType
 

Enumeration values:
FILE_NOT_FOUND 
REGULAR_FILE 
DIRECTORY 


Function Documentation

OSGDB_EXPORT void osgDB::appendPlatformSpecificLibraryFilePaths FilePathList filepath  ) 
 

OSGDB_EXPORT void osgDB::convertStringPathIntoFilePathList const std::string &  paths,
FilePathList filepath
 

convert a string containing a list of paths deliminated either with ';' (Windows) or ':' (All other platforms) into FilePath represetation.

OSGDB_EXPORT bool osgDB::fileExists const std::string &  filename  ) 
 

return true if a file exisits.

OSGDB_EXPORT FileType osgDB::fileType const std::string &  filename  ) 
 

return type of file.

OSGDB_EXPORT std::string osgDB::findDataFile const std::string &  filename,
const ReaderWriter::Options *  options,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE
 

Search for specified file in file system, checking first the database path set in the Options structure, then the DataFilePathList for possible paths, returning the full path of the first valid file found, return an empty string if no string is found.

OSGDB_EXPORT std::string osgDB::findDataFile const std::string &  filename,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE
 

Search for specified file in file system, checking the DataFilePathList for possible paths, returning the full path of the first valid file found, return an empty string if no string is found.

OSGDB_EXPORT std::string osgDB::findFileInDirectory const std::string &  fileName,
const std::string &  dirName,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE
 

return the directory/filename of a file if its is contained within specified directory. return "" if directory does not contain file. If caseInsensitive is set to true then a case insensitive comparison is used to compare fileName to directory contents. This is useful when unix programs attempt read case insentive windows filenames.

OSGDB_EXPORT std::string osgDB::findFileInPath const std::string &  filename,
const FilePathList filePath,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE
 

find specified file in specified file path.

OSGDB_EXPORT std::string osgDB::findLibraryFile const std::string &  filename,
CaseSensitivity  caseSensitivity = CASE_SENSITIVE
 

FilePathList& osgDB::getDataFilePathList  )  [inline]
 

OSGDB_EXPORT DirectoryContents osgDB::getDirectoryContents const std::string &  dirName  ) 
 

return the contents of a directory. returns an empty array on any error.

FilePathList& osgDB::getLibraryFilePathList  )  [inline]
 

OSGDB_EXPORT bool osgDB::makeDirectory const std::string &  directoryPath  ) 
 

OSGDB_EXPORT bool osgDB::makeDirectoryForFile const std::string &  filePath  ) 
 

void osgDB::setDataFilePathList const std::string &  paths  )  [inline]
 

void osgDB::setDataFilePathList const FilePathList filepath  )  [inline]
 

void osgDB::setLibraryFilePathList const std::string &  paths  )  [inline]
 

void osgDB::setLibraryFilePathList const FilePathList filepaths  )  [inline]
 


Generated on Fri May 13 15:15:44 2005 for openscenegraph by  doxygen 1.4.2