DEKI/ENGINE docs
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
Deki::FileSystem Class Reference

Holds the process-wide filesystems. More...

#include <deki/providers/FileSystem.h>

Static Public Member Functions

static bool Initialize ()
 Returns false on failure.
static void Shutdown ()
static IFileSystem * GetCurrentFileSystem ()
 The installed filesystem, or nullptr before one is set.
static bool IsInitialized ()
static bool SetFileSystem (IFileSystem *fs)
 Installs fs and takes ownership of it.
static bool SupportsStorageMode ()
 True when the filesystem can be exposed as USB mass storage.
static bool SetStorageMode (bool enabled)
 Enters or leaves USB mass storage mode. Returns false on failure.
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 UnregisterFileSystem (const std::string &prefix)
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 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.

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

◆ Initialize()

bool Deki::FileSystem::Initialize ( )
static

Returns false on failure.

◆ Shutdown()

void Deki::FileSystem::Shutdown ( )
static

◆ GetCurrentFileSystem()

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

The installed filesystem, or nullptr before one is set.

◆ IsInitialized()

bool Deki::FileSystem::IsInitialized ( )
inlinestatic

◆ SetFileSystem()

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

Installs fs and takes ownership of it.

◆ SupportsStorageMode()

bool Deki::FileSystem::SupportsStorageMode ( )
static

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

◆ SetStorageMode()

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

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

◆ 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.

◆ UnregisterFileSystem()

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

◆ 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.

◆ 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.


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