NDEVR
API Documentation
FileResource

Contains methods for getting information about particular OS directories or static program file directories. More...

Collaboration diagram for FileResource:
[legend]

Public Types

enum  ProgramFileVars { e_project_dir }
 Identifiers for program file variable substitution. More...

Static Public Member Functions

static File ExeFolder ()
 Gets the folder containing the currently running executable.
static File ExePath ()
 Gets the full path to the currently running executable.
static Buffer< FilegetMTPDevices ()
 Enumerates all connected MTP (Media Transfer Protocol) devices.
static File OSDocumentsFolder ()
 Gets the OS user documents folder.
static File OSDownloadsFolder ()
 Gets the OS user downloads folder.
static File OSProgramDataFolder ()
 Gets the OS shared program data folder.
static File OSProgramsFolder (bool use_64_bit=true)
 Gets the OS program files installation folder.
static File OSTempFolder ()
 Gets the OS-designated temporary file folder.
static File OSUserDataFolder ()
 Gets the OS user-specific application data folder.
static File PathToConstResources ()
 Gets the path to read-only constant resources bundled with the application.
static File PathToNDEVRDynamicResources ()
 Gets the path to NDEVR-level dynamic resources shared across programs.
static File PathToNDEVRSettings ()
 Gets the path to NDEVR-level settings shared across programs.
static File PathToProgramDynamicResources ()
 Gets the path to program-level dynamic resources that may be modified at runtime.
static File PathToProgramModels ()
 Gets the path to bundled program model files.
static File PathToProgramSettings ()
 Gets the path to program-level settings storage.
static File PathToProgramTranslations (bool user_file)
 Gets the path to program translation files.
static File PathToUserDynamicResources ()
 Gets the path to user-specific dynamic resources.
static File PathToUserLibrary ()
 Gets the path to the user's personal library folder.
static File PathToUserSettings ()
 Gets the path to user-specific settings storage.
static File ProgramTempPath ()
 Gets a temporary directory path scoped to the current program instance.
static void setPathToConstResources (const File &file)
 Sets the path to the constant resources directory.
static void SetPathToProgramDynamicResources (const File &file)
 Sets the path to the program-level dynamic resources directory.
static void SetPathToUserDynamicResources (const File &file)
 Sets the path to the user-specific dynamic resources directory.
static File SyncSettingsFolder ()
 Gets the folder used for synchronizing settings across devices.
static Buffer< FileUSBDrives ()
 Enumerates all connected USB drives.

Static Public Attributes

static Dictionary< String, StringFileEnvVariables
 Environment variable mappings for file path resolution.

Static Protected Attributes

static File s_path_to_app_data
 Cached path to the application data directory.
static File s_path_to_const_resources
 Cached path to the constant resources directory.
static File s_path_to_ndevr_dynamic_resources
 Cached path to the NDEVR dynamic resources directory.
static File s_path_to_program_dynamic_resources
 Cached path to the program dynamic resources directory.
static File s_path_to_temp
 Cached path to the program temporary directory.
static File s_path_to_user_dynamic_resources
 Cached path to the user dynamic resources directory.

Detailed Description

Contains methods for getting information about particular OS directories or static program file directories.


Definition at line 43 of file FileResource.h.

Member Enumeration Documentation

◆ ProgramFileVars

Identifiers for program file variable substitution.

Enumerator
e_project_dir 

The project directory path variable.

Definition at line 49 of file FileResource.h.

Member Function Documentation

◆ ExeFolder()

File FileResource::ExeFolder ( )
static

Gets the folder containing the currently running executable.

Returns
The File representing the executable's parent directory.

◆ ExePath()

File FileResource::ExePath ( )
static

Gets the full path to the currently running executable.

Returns
The File representing the executable path.

◆ getMTPDevices()

Buffer< File > FileResource::getMTPDevices ( )
static

Enumerates all connected MTP (Media Transfer Protocol) devices.

Returns
A Buffer of File objects representing MTP device paths.

◆ OSDocumentsFolder()

File FileResource::OSDocumentsFolder ( )
static

Gets the OS user documents folder.

Returns
The File representing the documents directory.

◆ OSDownloadsFolder()

File FileResource::OSDownloadsFolder ( )
static

Gets the OS user downloads folder.

Returns
The File representing the downloads directory.

◆ OSProgramDataFolder()

File FileResource::OSProgramDataFolder ( )
static

Gets the OS shared program data folder.

Returns
The File representing the program data directory.

◆ OSProgramsFolder()

File FileResource::OSProgramsFolder ( bool use_64_bit = true)
static

Gets the OS program files installation folder.

Parameters
[in]use_64_bitWhether to return the 64-bit program files directory.
Returns
The File representing the programs folder.

◆ OSTempFolder()

File FileResource::OSTempFolder ( )
static

Gets the OS-designated temporary file folder.

Returns
The File representing the system temp directory.

◆ OSUserDataFolder()

File FileResource::OSUserDataFolder ( )
static

Gets the OS user-specific application data folder.

Returns
The File representing the user data directory.

◆ PathToConstResources()

File FileResource::PathToConstResources ( )
static

Gets the path to read-only constant resources bundled with the application.

Returns
The File representing the constant resources directory.

◆ PathToNDEVRDynamicResources()

File FileResource::PathToNDEVRDynamicResources ( )
static

Gets the path to NDEVR-level dynamic resources shared across programs.

Returns
The File representing the NDEVR dynamic resources directory.

◆ PathToNDEVRSettings()

File FileResource::PathToNDEVRSettings ( )
static

Gets the path to NDEVR-level settings shared across programs.

Returns
The File representing the NDEVR settings directory.

◆ PathToProgramDynamicResources()

File FileResource::PathToProgramDynamicResources ( )
static

Gets the path to program-level dynamic resources that may be modified at runtime.

Returns
The File representing the program dynamic resources directory.

◆ PathToProgramModels()

File FileResource::PathToProgramModels ( )
static

Gets the path to bundled program model files.

Returns
The File representing the program models directory.

◆ PathToProgramSettings()

File FileResource::PathToProgramSettings ( )
static

Gets the path to program-level settings storage.

Returns
The File representing the program settings directory.

◆ PathToProgramTranslations()

File FileResource::PathToProgramTranslations ( bool user_file)
static

Gets the path to program translation files.

Parameters
[in]user_fileWhether to return the user-specific translation file path.
Returns
The File representing the translations directory.

◆ PathToUserDynamicResources()

File FileResource::PathToUserDynamicResources ( )
static

Gets the path to user-specific dynamic resources.

Returns
The File representing the user dynamic resources directory.

◆ PathToUserLibrary()

File FileResource::PathToUserLibrary ( )
static

Gets the path to the user's personal library folder.

Returns
The File representing the user library directory.

◆ PathToUserSettings()

File FileResource::PathToUserSettings ( )
static

Gets the path to user-specific settings storage.

Returns
The File representing the user settings directory.

◆ ProgramTempPath()

File FileResource::ProgramTempPath ( )
static

Gets a temporary directory path scoped to the current program instance.

Returns
The File representing the program-specific temp directory.

◆ setPathToConstResources()

void FileResource::setPathToConstResources ( const File & file)
static

Sets the path to the constant resources directory.

Parameters
[in]fileThe directory to use for constant resources.

◆ SetPathToProgramDynamicResources()

void FileResource::SetPathToProgramDynamicResources ( const File & file)
static

Sets the path to the program-level dynamic resources directory.

Parameters
[in]fileThe directory to use for program dynamic resources.

◆ SetPathToUserDynamicResources()

void FileResource::SetPathToUserDynamicResources ( const File & file)
static

Sets the path to the user-specific dynamic resources directory.

Parameters
[in]fileThe directory to use for user dynamic resources.

◆ SyncSettingsFolder()

File FileResource::SyncSettingsFolder ( )
static

Gets the folder used for synchronizing settings across devices.

Returns
The File representing the sync settings directory.

◆ USBDrives()

Buffer< File > FileResource::USBDrives ( )
static

Enumerates all connected USB drives.

Returns
A Buffer of File objects representing mounted USB drive paths.

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