23#if !defined SBFILEHELPER_H
64 typedef struct __stat64
Stat;
66 typedef struct stat64
Stat;
312 static int findExtensionPos(
const SbString & filename );
318 static void setFileExtension(
SbString & _filename,
const SbString &_strExt );
330 static SbString getOivLocalAppDataPath();
335 static SbString getOivLibrariesPath();
340 static bool createSubDirectories(
const SbString& path);
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Utilities class ...
static void close(FILE *fp)
Close a file opened using the open function.
static SbString getExtension(const SbString &filename)
Returns the extension part of the specified filename.
static SbString getDirName(const SbString &fullFilePath)
Returns the directory path part of a full path string.
static int removeFile(const SbString &fileName)
Removes the specified file.
static SbString getTempFilename(const SbString &path, const SbString &prefix)
Returns a temporary filename.
static SbBool isUrl(const SbString &filename)
Returns TRUE if the filename is a network url like: http:// or ftp://.
static FILE * open(const SbString &filename, const char *flags)
Open a file and return a handle to it.
static int setCurrentDirectory(const SbString &directory)
Sets the current working directory.
static bool getStat(const SbString &filename, SbFileHelper::Stat &stat)
This function fills the stat structure with information about the specified file.
static int createDirectory(const SbString &directory)
Create the specified directory.
FileAccess
File access mode enum.
@ READ
Check file for Read access only.
@ WRITE
Check file for Write access only.
@ EXECUTE
Check file for Execution access.
@ EXISTENCE
Check file for existence only.
@ READ_WRITE
Check file for Read and Write access.
static SbString toWindowsPath(const SbString &path)
Converts a Unix path (with '/') to a Microsoft Windows path (with '\').
static void listFiles(const SbString &path, const SbString &pattern, std::vector< SbString > &files)
Returns a list of the files in directory 'path' that match a 'pattern' Pattern may include the basic ...
static SbString getBaseName(const SbString &fullFilePath)
Returns the filename part of a full path string.
static SbBool isFileSystemUrl(const SbString &filename)
Returns TRUE if the filename is a file system URL like: file://...
static SbString expandString(const SbString &string)
Returns a new version of the string with "$NAME" SoPreference variable names expanded to their define...
static SbString makeFileSystemURL(const SbString &filename)
Converts a filename to a file system URL.
static SbString cleanUpPath(const SbString &path)
Removes all multiple occurences of '/' in the path.
static SbString getCurrentDirectory()
Returns the current directory.
static SbBool isAccessible(const SbString &filename, FileAccess mode=READ)
Returns TRUE if a file is accessible
static SbString getTempDirectory()
Returns the path to the temporary directory used by the system.
static SbString fileSystemURLToFilename(const SbString &url)
Converts a file system URL to a regular filename E.g "file:///c:/temp/test.dat" becomes "c:/temp/te...
static SbString toUnixPath(const SbString &path)
Converts a Microsoft Windows path (with '\') to a Unix path (with '/').
static bool containsWindowsDrive(const SbString &path)
Returns true if the specified path starts with a Microsoft Windows drive letter.
static unsigned long long getFileSize(const SbString &filename)
Returns the size of the specified file in bytes.
Class for smart character strings.