AppCUI::OS

namespace OS

Operating system services: files (File, MemoryFile, DataObject), the clipboard, dynamic libraries, date / time and special folders.

Classes

Enumerations

enum class AppCUI::OS::SpecialFolder : uint32

Values:

enumerator AppPath = 0
enumerator Desktop
enumerator Documents
enumerator LocalDocuments
enumerator Downloads
enumerator LocalDownloads
enumerator Music
enumerator LocalMusic
enumerator Pictures
enumerator LocalPictures
enumerator Videos
enumerator LocalVideos

Type aliases

using AppCUI::OS::SpecialFolderMap = std::map<SpecialFolder, FSLocationData>
using AppCUI::OS::RootsVector = vector<FSLocationData>

Functions

void AppCUI::OS::GetSpecialFolders(SpecialFolderMap &specialFolders, RootsVector &roots)

Fills the specialFolders map and roots vector with paths.

std::filesystem::path AppCUI::OS::GetCurrentApplicationPath()
bool AppCUI::OS::IsHostFileTransferAvailable()

Returns true when the application runs in a sandbox whose file system is separate from the user’s machine (the Browser frontend).

In that case the file dialogs show Upload / Download buttons and files can be sent to the user with DownloadFile.

bool AppCUI::OS::DownloadFile(const std::filesystem::path &file)

Sends a copy of file to the user’s machine (the Browser frontend starts a download).

Returns false when the frontend does not support it (see IsHostFileTransferAvailable) or the file cannot be read.