|
| File (std::string path=".", std::string mode="r", bool open_=false) |
|
| File (const FilePath &path, std::string mode="r", bool open_=false) |
|
bool | open (const std::string &path, const std::string &mode="r") |
| Open file. More...
|
|
bool | open () |
| Open file using member variables. More...
|
|
void | close () |
| Close file.
|
|
File & | mode (const std::string &v) |
| Set i/o mode. More...
|
|
File & | path (const std::string &v) |
| Set path of file.
|
|
int | write (const std::string &v) |
| Write string to file.
|
|
int | write (const void *v, int itemSizeInBytes, int items=1) |
| Write memory elements to file.
|
|
int | read (void *v, int size, int items=1) |
| Read memory elements from file.
|
|
const char * | readAll () |
| Returns character string of file contents (read mode only)
|
|
bool | opened () const |
| Returns whether file is open.
|
|
const std::string & | mode () const |
| Returns file i/o mode string.
|
|
const std::string & | path () const |
| Returns path string.
|
|
size_t | size () const |
| Returns size, in bytes, of file contents.
|
|
FILE * | filePointer () |
| Return size file (or 0 on failure) More...
|
|
|
static std::string | read (const std::string &path) |
| Quick and dirty read of all bytes from file.
|
|
static int | write (const std::string &path, const void *v, int size, int items=1) |
| Quick and dirty write memory to file.
|
|
static int | write (const std::string &path, const std::string &data) |
| Quick and dirty write character string to file.
|
|
static bool | copy (const std::string &srcPath, const std::string &dstPath, unsigned int bufferSize=1e6) |
|
static bool | remove (const std::string &path) |
| Delete file from file system.
|
|
static std::string | conformDirectory (const std::string &dir) |
| Returns string ensured to having an ending delimiter. More...
|
|
static std::string | conformPathToOS (const std::string &path) |
| Conforms path. More...
|
|
static std::string | absolutePath (const std::string &path) |
| Convert relative paths to absolute paths.
|
|
static bool | isRelativePath (const std::string &path) |
|
static std::string | currentPath () |
|
static bool | isSamePath (const std::string &path1, const std::string &path2) |
|
static std::string | baseName (const std::string &path, const std::string &suffix="") |
| Returns the base name of path. More...
|
|
static std::string | directory (const std::string &path) |
| Returns the directory part of path. More...
|
|
static std::string | extension (const std::string &path) |
| Returns extension of file name. More...
|
|
static bool | exists (const std::string &path) |
| Returns whether a file or directory exists.
|
|
static bool | exists (const std::string &name, const std::string &path) |
| Returns whether a file in a directory exists.
|
|
static bool | isDirectory (const std::string &path) |
| Returns true if path is a directory.
|
|
static bool | searchBack (std::string &rootPath, const std::string &matchPath, int maxDepth=6) |
| Search for file or directory back from current directory. More...
|
|
static bool | searchBack (std::string &path, int maxDepth=6) |
|
static al_sec | modificationTime (const char *path) |
|
File.
Used to retrieve data from and store data to disk. The term 'path' means a file or directory.
Definition at line 166 of file al_File.hpp.
FILE* al::File::filePointer |
( |
| ) |
|
|
inline |
Return size file (or 0 on failure)
Return modification time of file (or 0 on failure) as number of seconds since 00:00:00 January 1, 1970 UTC Return last access time of file (or 0 on failure) as number of seconds since 00:00:00 January 1, 1970 UTC Return creation time of file (or 0 on failure) as number of seconds since 00:00:00 January 1, 1970 UTC Return space used on disk of file (or 0 on failure)
Definition at line 257 of file al_File.hpp.