libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Attributes | List of all members
donut::FilesystemOptions Struct Reference

Configuration options for a virtual Filesystem. More...

#include <donut/Filesystem.hpp>

Public Attributes

const char * organizationName = nullptr
 Non-owning pointer to a null-terminated UTF-8 string that commonly identifies the publisher of the application, such as an organization name, alias or internet domain. More...
 
const char * applicationName = nullptr
 Non-owning pointer to a null-terminated UTF-8 string that uniquely identifies the application among all other applications released by the same organization. More...
 
const char * dataDirectory = "."
 Non-owning pointer to a null-terminated UTF-8 string of the host filepath to the main data directory which will be mounted for reading. More...
 
const char * archiveSearchPath = nullptr
 Non-owning pointer to a null-terminated UTF-8 string of the virtual filepath to a directory in which to search for additional initial archives to mount. More...
 
const char * archiveSearchFileExtension = nullptr
 Non-owning pointer to a null-terminated UTF-8 string of the filename extension of initial archives to search for. More...
 
FilesystemMountPriority mountPriorityOfDataDirectoryRelativeToOutputDirectory = FilesystemMountPriority::LOWER
 Mount priority of the main data directory relative to the initial write directory. More...
 
FilesystemMountPriority mountPriorityOfArchiveSearchRelativeToOutputDirectory = FilesystemMountPriority::LOWER
 Mount priority of the additional initial archives relative to the initial write directory. More...
 
FilesystemMountPriority mountPriorityOfArchiveSearchRelativeToDataDirectory = FilesystemMountPriority::HIGHER
 Mount priority of the additional initial archives relative to the main data directory. More...
 
bool mountOutputDirectory = true
 Mount the initial output directory for reading in addition to writing. More...
 

Detailed Description

Configuration options for a virtual Filesystem.

Member Data Documentation

◆ organizationName

const char* donut::FilesystemOptions::organizationName = nullptr

Non-owning pointer to a null-terminated UTF-8 string that commonly identifies the publisher of the application, such as an organization name, alias or internet domain.

When set, this is used to determine part of the filesystem's initial output directory, into which files such as configuration or save data can then be written by the application. Namely, it is used for the name of the organization folder in the user/platform-specific preferences directory on platforms where it is applicable, which will be created if it doesn't already exist.

If set to nullptr, no output directory will be created nor mounted, and the application will be unable to write files unless an output directory is set manually using Filesystem::setOutputDirectory().

See also
applicationName
mountOutputDirectory
outputDirectoryMountPriority
dataDirectory

◆ applicationName

const char* donut::FilesystemOptions::applicationName = nullptr

Non-owning pointer to a null-terminated UTF-8 string that uniquely identifies the application among all other applications released by the same organization.

When set, this is used to determine part of the filesystem's initial write directory, into which files such as configuration or save data can then be written by the application. Namely, it is used for the name of the application folder under the organization folder in the user/platform-specific preferences directory on platforms where it is applicable, which will be created if it doesn't already exist.

If set to nullptr, no output directory will be created nor mounted, and the application will be unable to write files unless an output directory is set manually using Filesystem::setOutputDirectory().

See also
organizationName
mountOutputDirectory
outputDirectoryMountPriority
dataDirectory

◆ dataDirectory

const char* donut::FilesystemOptions::dataDirectory = "."

Non-owning pointer to a null-terminated UTF-8 string of the host filepath to the main data directory which will be mounted for reading.

If set to nullptr, no main data directory will be mounted, and the application will be unable to read any files unless the output directory or additional archives are mounted, or if an archive is mounted manually using Filesystem::mountArchive().

See also
organizationName
applicationName

◆ archiveSearchPath

const char* donut::FilesystemOptions::archiveSearchPath = nullptr

Non-owning pointer to a null-terminated UTF-8 string of the virtual filepath to a directory in which to search for additional initial archives to mount.

If set to nullptr, no additional archives will be mounted.

See also
archiveSearchFileExtension
archiveSearchMountPriority

◆ archiveSearchFileExtension

const char* donut::FilesystemOptions::archiveSearchFileExtension = nullptr

Non-owning pointer to a null-terminated UTF-8 string of the filename extension of initial archives to search for.

If set to nullptr, all found archives will be mounted regardless of extension.

Note
This option is only applicable when archiveSearchPath is not nullptr.
See also
archiveSearchPath
archiveSearchMountPriority

◆ mountPriorityOfDataDirectoryRelativeToOutputDirectory

FilesystemMountPriority donut::FilesystemOptions::mountPriorityOfDataDirectoryRelativeToOutputDirectory = FilesystemMountPriority::LOWER

Mount priority of the main data directory relative to the initial write directory.

Note
This option is only applicable when mountOutputDirectory is set to true, and neither dataDirectory, organizationName nor applicationName are nullptr.
See also
organizationName
applicationName
mountOutputDirectory

◆ mountPriorityOfArchiveSearchRelativeToOutputDirectory

FilesystemMountPriority donut::FilesystemOptions::mountPriorityOfArchiveSearchRelativeToOutputDirectory = FilesystemMountPriority::LOWER

Mount priority of the additional initial archives relative to the initial write directory.

Note
This option is only applicable when archiveSearchPath is not nullptr.
See also
archiveSearchPath
archiveSearchFileExtension

◆ mountPriorityOfArchiveSearchRelativeToDataDirectory

FilesystemMountPriority donut::FilesystemOptions::mountPriorityOfArchiveSearchRelativeToDataDirectory = FilesystemMountPriority::HIGHER

Mount priority of the additional initial archives relative to the main data directory.

Note
This option is only applicable when archiveSearchPath is not nullptr.
See also
archiveSearchPath
archiveSearchFileExtension

◆ mountOutputDirectory

bool donut::FilesystemOptions::mountOutputDirectory = true

Mount the initial output directory for reading in addition to writing.

Note
This option is only applicable when neither organizationName nor applicationName are nullptr.
See also
organizationName
applicationName
outputDirectoryMountPriority
dataDirectory

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