#include <spInputOutputFileSystem.hpp>
List of all members.
Detailed Description
FileSystem can be used for easy file operations such as reading and writing from and to the disk. Internally the ANSI C "FILE" pointer with its standard C file functions are used.
Constructor & Destructor Documentation
sp::io::FileSystem::FileSystem |
( |
|
) |
|
sp::io::FileSystem::~FileSystem |
( |
|
) |
|
Member Function Documentation
void sp::io::FileSystem::closeFile |
( |
File *& |
FileObject |
) |
|
Closes and deletes the specified File object.
bool sp::io::FileSystem::copyFile |
( |
const stringc & |
Filename, |
|
|
const stringc & |
NewFilename | |
|
) |
| | |
bool sp::io::FileSystem::createDirectory |
( |
const stringc & |
Path |
) |
|
bool sp::io::FileSystem::createFile |
( |
const stringc & |
Filename |
) |
|
Creates a new file on HDD.
- Returns:
- True if succeed. Otherwise false.
- Note:
- If this file already exist it will be cleared. Be careful!
bool sp::io::FileSystem::deleteDirectory |
( |
const stringc & |
Path |
) |
|
bool sp::io::FileSystem::deleteFile |
( |
const stringc & |
Filename |
) |
|
bool sp::io::FileSystem::findFile |
( |
const stringc & |
Filename |
) |
const |
Returns true if the specified file does exist on HDD (hard-disk drive).
stringc sp::io::FileSystem::getCurrentDirectory |
( |
|
) |
const |
u32 sp::io::FileSystem::getFileSize |
( |
const io::stringc & |
Filename |
) |
const |
Returns size of the specified file on hard-disk drive (in bytes).
bool sp::io::FileSystem::moveFile |
( |
const stringc & |
Filename, |
|
|
const stringc & |
NewFilename | |
|
) |
| | |
Opens a new FileVirtual object with the specified permission.
Opens a new File object. To start reading or writing call "File::open".
Opens a new FilePhysical object with the specified filename and the specified permission.
Reads the whole specified file from HDD into the new FileVirtual's buffer.
Reads the whole file into the return string.
File * sp::io::FileSystem::readResourceFile |
( |
const stringc & |
Filename |
) |
|
Reads a resource file. This can be an asset or an HDD file which depends on the current configuration.
- Parameters:
-
| Filename,: | Specifies the resource filename. |
- Returns:
- Pointer to the new File object.
- See also:
- {setResourceConfig}
void sp::io::FileSystem::setCurrentDirectory |
( |
const stringc & |
Path |
) |
|
Sets the new working directory. If you are handling files with relative paths be aware about the current working directory!
void sp::io::FileSystem::setResourceConfig |
( |
const EResourceConfigs |
Config |
) |
[static] |
Sets the resource cofiguration. By default RESOURCE_ASSET for Android and RESOURCE_PHYSICAL for other OS.
The documentation for this class was generated from the following files: