File System Provider for handling different platform filesystem implementations.
More...
#include <DekiFileSystem.h>
File System Provider for handling different platform filesystem implementations.
Holds the process-wide filesystem. Platform integration packages install a concrete implementation via SetFileSystem(); there is no build-time platform enum — which one you get is decided by which package is loaded.
◆ Initialize()
| bool DekiFileSystem::Initialize |
( |
| ) |
|
|
static |
Initialize the filesystem manager.
- Returns
- true if initialization successful, false otherwise
◆ Shutdown()
| void DekiFileSystem::Shutdown |
( |
| ) |
|
|
static |
Shutdown the current filesystem.
◆ GetCurrentFileSystem()
Get the current filesystem implementation.
- Returns
- Pointer to current filesystem, or nullptr if not initialized
◆ IsInitialized()
| bool DekiFileSystem::IsInitialized |
( |
| ) |
|
|
inlinestatic |
Check if the filesystem manager is initialized.
- Returns
- true if initialized, false otherwise
◆ SetFileSystem()
Set a custom filesystem implementation.
- Parameters
-
| fs | Pointer to filesystem (takes ownership) |
- Returns
- true if successful
◆ SupportsStorageMode()
| bool DekiFileSystem::SupportsStorageMode |
( |
| ) |
|
|
static |
Check if storage mode (USB MSC) is supported.
- Returns
- true if the current filesystem supports storage mode
◆ SetStorageMode()
| bool DekiFileSystem::SetStorageMode |
( |
bool | enabled | ) |
|
|
static |
Enter or exit storage mode (USB Mass Storage).
- Parameters
-
| enabled | true to enter storage mode, false to exit |
- Returns
- true if mode change successful
◆ IsStorageMode()
| bool DekiFileSystem::IsStorageMode |
( |
| ) |
|
|
static |
Check if currently in storage mode.
- Returns
- true if in storage mode (USB MSC active)
◆ RegisterFileSystem()
| void DekiFileSystem::RegisterFileSystem |
( |
const std::string & | prefix, |
|
|
IDekiFileSystem * | fs ) |
|
static |
Register a filesystem for a specific path prefix.
- Parameters
-
| prefix | Path prefix (e.g., "F:/", "S:/") |
| fs | Filesystem to handle paths with this prefix |
◆ UnregisterFileSystem()
| void DekiFileSystem::UnregisterFileSystem |
( |
const std::string & | prefix | ) |
|
|
static |
Unregister a filesystem for a path prefix.
- Parameters
-
| prefix | Path prefix to unregister |
◆ GetFileSystemForPath()
| IDekiFileSystem * DekiFileSystem::GetFileSystemForPath |
( |
const char * | path | ) |
|
|
static |
Get the filesystem that handles a specific path.
- Parameters
-
| path | Path to look up (e.g., "F:/boot.scene", "S:/main.scene", or "scenes/Demo") |
- Returns
- Filesystem for this path, or default filesystem if no prefix match
◆ SetDefaultFileSystem()
Set the default filesystem for non-prefixed paths.
- Parameters
-
| fs | Filesystem to use for paths without a registered prefix (e.g., "scenes/Demo") |
This allows code to use simple relative paths like "scenes/Demo" instead of prefixed paths like "S:/scenes/Demo". The default filesystem will handle path resolution appropriately for the platform.
The documentation for this class was generated from the following file: