|
CeresEngine 0.2.0
A game development framework
|
Interface for accessing file systems. More...
#include <CeresEngine/Foundation/IO/FileSystem.hpp>
Public Member Functions | |
| IFileSystem () | |
| virtual | ~IFileSystem () |
| virtual FileHandle | open (StringView path)=0 |
| Opens a file or directory in file system. | |
| virtual FileHandle | open (String &&path)=0 |
| Opens a file or directory in file system. | |
| FileHandle | open (const char *path) |
| Opens a file or directory in file system. | |
| virtual FileWatcher | createFileWatcher (ExecutionContext &executionContext, const FileHandle &directory, const FileEvents &events=FileEvent::Default, bool recursive=true)=0 |
| Watches a directory for changes. | |
Public Member Functions inherited from CeresEngine::RefCounted< IFileSystem > | |
| RefCounted (Args &&... args) | |
Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it. | |
| void | retain () noexcept |
| Retains the object by increment it's reference count by one. | |
| bool | release () noexcept |
| Relases the object by decrementing it's reference count by one. | |
Static Public Member Functions | |
| static IFileSystem * | getLocal () noexcept |
| Gets the underlying platform local file system implementation. | |
Interface for accessing file systems.
| CeresEngine::IFileSystem::IFileSystem | ( | ) |
|
virtual |
|
pure virtual |
Watches a directory for changes.
| executionContext | The execution context where the callbacks will be called from. |
| directory | A handle to directory that shall be watched. |
| events | The events that are watched (combination of FileEvent values). |
| recursive | Determines whether the directory will be recursively watched. |
Implemented in CeresEngine::AppleFileSystem, CeresEngine::Win32FileSystem, and CeresEngine::LocalFileSystem.
|
staticnoexcept |
Gets the underlying platform local file system implementation.
nullptr. Platform implementors should override this method and return the local file system implementation of their platform.| FileHandle CeresEngine::IFileSystem::open | ( | const char * | path | ) |
Opens a file or directory in file system.
| path | The path to file or directory |
|
pure virtual |
Opens a file or directory in file system.
| path | The path to file or directory |
Implemented in CeresEngine::Win32FileSystem, CeresEngine::LocalFileSystem, and CeresEngine::POSIXFileSystem.
|
pure virtual |
Opens a file or directory in file system.
| path | The path to file or directory |
Implemented in CeresEngine::Win32FileSystem, CeresEngine::LocalFileSystem, and CeresEngine::POSIXFileSystem.