DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches
Deki::FileSystem Class Reference

Holds the process-wide filesystems. More...

#include <deki/providers/FileSystem.h>

Static Public Member Functions

static IFileSystem * GetCurrentFileSystem ()
 The installed filesystem, or nullptr before one is set.
static IFileSystem * GetFileSystemForPath (const char *path)
 The filesystem for path (such as "F:/boot.scene" or "scenes/Demo"): the one registered for its prefix, else the default.
static bool Initialize ()
 Returns false on failure.
static bool IsInitialized ()
static bool IsStorageMode ()
 True while USB mass storage is active.
static void RegisterFileSystem (const std::string &prefix, IFileSystem *fs)
 Routes paths starting with prefix (such as "F:/" or "S:/") to fs.
static void SetDefaultFileSystem (IFileSystem *fs)
 The filesystem for paths with no registered prefix, so code can use "scenes/Demo" instead of "S:/scenes/Demo"; it resolves them as suits the platform.
static bool SetFileSystem (IFileSystem *fs)
 Installs fs and takes ownership of it.
static bool SetStorageMode (bool enabled)
 Enters or leaves USB mass storage mode. Returns false on failure.
static void Shutdown ()
static bool SupportsStorageMode ()
 True when the filesystem can be exposed as USB mass storage.
static void UnregisterFileSystem (const std::string &prefix)

Detailed Description

Holds the process-wide filesystems.

Platform packages install their implementation with SetFileSystem(), so the loaded package decides which one is used.

Member Function Documentation

◆ GetCurrentFileSystem()

IFileSystem * Deki::FileSystem::GetCurrentFileSystem ( )
static

The installed filesystem, or nullptr before one is set.

◆ GetFileSystemForPath()

IFileSystem * Deki::FileSystem::GetFileSystemForPath ( const char * path)
static

The filesystem for path (such as "F:/boot.scene" or "scenes/Demo"): the one registered for its prefix, else the default.

◆ Initialize()

bool Deki::FileSystem::Initialize ( )
static

Returns false on failure.

◆ IsInitialized()

bool Deki::FileSystem::IsInitialized ( )
inlinestatic

◆ IsStorageMode()

bool Deki::FileSystem::IsStorageMode ( )
static

True while USB mass storage is active.

◆ RegisterFileSystem()

void Deki::FileSystem::RegisterFileSystem ( const std::string & prefix,
IFileSystem * fs )
static

Routes paths starting with prefix (such as "F:/" or "S:/") to fs.

◆ SetDefaultFileSystem()

void Deki::FileSystem::SetDefaultFileSystem ( IFileSystem * fs)
static

The filesystem for paths with no registered prefix, so code can use "scenes/Demo" instead of "S:/scenes/Demo"; it resolves them as suits the platform.

◆ SetFileSystem()

bool Deki::FileSystem::SetFileSystem ( IFileSystem * fs)
static

Installs fs and takes ownership of it.

◆ SetStorageMode()

bool Deki::FileSystem::SetStorageMode ( bool enabled)
static

Enters or leaves USB mass storage mode. Returns false on failure.

◆ Shutdown()

void Deki::FileSystem::Shutdown ( )
static

◆ SupportsStorageMode()

bool Deki::FileSystem::SupportsStorageMode ( )
static

True when the filesystem can be exposed as USB mass storage.

◆ UnregisterFileSystem()

void Deki::FileSystem::UnregisterFileSystem ( const std::string & prefix)
static

The documentation for this class was generated from the following file: