|
AGX Dynamics
2.37.2.0
|
#include <FileSystem.h>
Public Types | |
| typedef agx::Callback1< const agx::String & > | ScanCallback |
| Scan a directory. More... | |
| typedef struct stat | StatStruct |
Static Public Member Functions | |
| static AGXCORE_EXPORT bool | closeFile (FILE *stream) |
| Close the FILE* stream. More... | |
| static AGXCORE_EXPORT agx::String | combinePath (const agx::String &path1, const agx::String &path2) |
| Combine two paths with a separator. More... | |
| static AGXCORE_EXPORT time_t | compareDate (const agx::String &path1, const agx::String &path2) |
| static AGXCORE_EXPORT agx::String | convertToColladaFilePath (const agx::String &filePath) |
| Take a filepath, convert it to Unix format (using UNIX_PATH_SEPARATOR) and finally convert it to a format that Collada DAE api accepts. More... | |
| static AGXCORE_EXPORT agx::String | convertToNativeFilePath (const agx::String &filePath) |
| static AGXCORE_EXPORT agx::String | convertUnixFilePathToWindows (const agx::String &unixStyle) |
| static AGXCORE_EXPORT agx::String | convertWindowsFilePathToUnix (const agx::String &windowsStyle) |
| static AGXCORE_EXPORT bool | copy (const agx::String &source, const agx::String &destination) |
| static AGXCORE_EXPORT bool | exists (const agx::String &path) |
| Test if a path exists. More... | |
| static agx::String AGXCORE_EXPORT | getAbsolutePath (const agx::String &relativePath) |
If is a relative path (isabsolute() returns false), the path will be expanded into a full path using current working directory. More... | |
| static agx::String AGXCORE_EXPORT | getCurrentWorkingDirectory () |
| static AGXCORE_EXPORT agx::String | getDirectory (const agx::String &filePath) |
| static AGXCORE_EXPORT agx::String | getFileExtension (const agx::String &filePath) |
| static AGXCORE_EXPORT size_t | getFilesInDirectory (agx::StringVector &result, const agx::String &path, bool recursive=false) |
| Returns a list of all files in a directory. More... | |
| static AGXCORE_EXPORT agx::String | getFileWithExtension (const agx::String &filePath) |
| static AGXCORE_EXPORT agx::String | getFileWithoutExtension (const agx::String &filePath) |
| static agx::String AGXCORE_EXPORT | getPath (const agx::String &path) |
| \ return the path without any ending filename (only the directory/disk) in native format More... | |
| static AGXCORE_EXPORT agx::String | getSystemTmpDirectory () |
| static AGXCORE_EXPORT agx::String | getTmpFilename () |
| static AGXCORE_EXPORT bool | isAbsolute (const agx::String &path) |
| static AGXCORE_EXPORT bool | isDir (const agx::String &path) |
| Test if a path is a directory. More... | |
| static AGXCORE_EXPORT bool | isLink (const agx::String &path) |
| static AGXCORE_EXPORT bool | mkdir (const agx::String &path, bool recursive=false) |
| Creates a directory on the host file system. More... | |
| static AGXCORE_EXPORT agx::String | mkTmpDirectory (const agx::String &prefix="") |
| Create a temporary directory. More... | |
| static AGXCORE_EXPORT agx::String | mkTmpDirectory (const agx::String &parentDirectory, const agx::String &prefix) |
| static AGXCORE_EXPORT FILE * | openFile (const char *file, const char *mode) |
| Open a file. More... | |
| static AGXCORE_EXPORT FILE * | openFile (const agx::String &str, const char *mode) |
| Open a file. More... | |
| static AGXCORE_EXPORT bool | readable (const agx::String &path) |
| Test if a path exists and is readable. More... | |
| static AGXCORE_EXPORT agx::String | readFile (const agx::String &filename) |
| Read the contents of filename and return it as a String. More... | |
| static AGXCORE_EXPORT bool | remove (const agx::String &path, bool recursive=false) |
| static AGXCORE_EXPORT bool | rename (const agx::String &oldPath, const agx::String &newPath) |
| static AGXCORE_EXPORT bool | scan (const agx::String &path, ScanCallback callback) |
| static bool AGXCORE_EXPORT | setCurrentWorkingDirectory (const agx::String &path) |
| Set the current working directory. More... | |
| static AGXCORE_EXPORT size_t | size (const agx::String &path) |
| /return The size of the file. More... | |
| static AGXCORE_EXPORT int | stat (const agx::String &path, StatStruct *buf) |
| Wrapper around the stat-function to work around a bug in Visual Studio when passing an empty string to stat. More... | |
| static AGXCORE_EXPORT bool | writeable (const agx::String &path) |
| Test if a path exists and is writeable. More... | |
Static Public Attributes | |
| static AGXCORE_EXPORT const char *const | DLL_SUFFIX |
| Filetype for dynamically loaded libraries (dll / so / dylib) More... | |
| static AGXCORE_EXPORT const char *const | PATH_DELIMITER |
| Separator between paths in a list of paths, on unix: :, on windows ;. More... | |
| static AGXCORE_EXPORT const char *const | PATH_SEPARATOR |
| Separator between directories in a file path: on unix /, on windows backlash. More... | |
| static AGXCORE_EXPORT const char *const | UNIX_PATH_SEPARATOR |
| Path separator under UNIX /. More... | |
| static AGXCORE_EXPORT const char *const | WINDOWS_PATH_SEPARATOR |
| Path separator under Windows: backlash. More... | |
Definition at line 29 of file FileSystem.h.
| typedef agx::Callback1<const agx::String&> agxIO::FileSystem::ScanCallback |
Scan a directory.
Definition at line 84 of file FileSystem.h.
| typedef struct stat agxIO::FileSystem::StatStruct |
Definition at line 34 of file FileSystem.h.
|
static |
Close the FILE* stream.
|
static |
Combine two paths with a separator.
This method will return the path in native format Any double occurrence of path separators will be removed.
| path1 | - First path to be combined |
| path2 | - Second path to be combined |
|
static |
path1 and path 2, OR 0 if none of the two files could be accessed OR 1 if path1 could not be accessed OR -1 of path2 could not be accessed.
|
static |
Take a filepath, convert it to Unix format (using UNIX_PATH_SEPARATOR) and finally convert it to a format that Collada DAE api accepts.
For windows this means that "c:\path" -> "/c:/path"
If the string "://" can be found in filePath then no conversion will take place, as it assumes that the path is already in the correct format.
|
static |
filepath converted to the current platforms filepath specification
|
static |
| unixStyle | - Path in unix style (with / separators) |
|
static |
| windowsStyle | - Path in windows style (with \ separators) |
|
static |
|
static |
Test if a path exists.
|
static |
If is a relative path (isabsolute() returns false), the path will be expanded into a full path using current working directory.
relativePath expanded into an absolute path
|
static |
|
static |
|
static |
|
static |
Returns a list of all files in a directory.
| result | - The vector that will be populated with all files in path. |
| path | - The path to the directory where files will be found. If empty current directory ("./") will be used. |
| recursive | - If true, a recursive search for files will be performed. |
|
static |
|
static |
|
static |
\ return the path without any ending filename (only the directory/disk) in native format
|
static |
|
static |
|
static |
|
static |
Test if a path is a directory.
|
static |
|
static |
Creates a directory on the host file system.
| path | - Path to the directory that will be created |
| recursive | - If true, non existing directories in the path will be created, not just the last. |
|
static |
Create a temporary directory.
|
static |
|
static |
Open a file.
The filename should be in ascii or utf-8 format.
|
static |
Open a file.
The filename should be in ascii or utf-8 format.
|
static |
Test if a path exists and is readable.
|
static |
Read the contents of filename and return it as a String.
|
static |
|
static |
|
static |
|
static |
Set the current working directory.
|
static |
/return The size of the file.
|
static |
Wrapper around the stat-function to work around a bug in Visual Studio when passing an empty string to stat.
| path | The path to the file (c-string in original stat) |
| buf | The pointer to a preallocated stat-struct (see original stat-function). |
|
static |
Test if a path exists and is writeable.
|
static |
Filetype for dynamically loaded libraries (dll / so / dylib)
Definition at line 50 of file FileSystem.h.
|
static |
Separator between paths in a list of paths, on unix: :, on windows ;.
Definition at line 47 of file FileSystem.h.
|
static |
Separator between directories in a file path: on unix /, on windows backlash.
Definition at line 38 of file FileSystem.h.
|
static |
Path separator under UNIX /.
Definition at line 41 of file FileSystem.h.
|
static |
Path separator under Windows: backlash.
Definition at line 44 of file FileSystem.h.