Filesystem Structures

Resources are handled differently based on which filesystem type they follow.

Structures in this document can be used to alter filesystem settings for resources operations.

See Filesystem Design - Local/Remote for further details.

enum class CarbonResources::ResourceSourceType

Parameters to represent resource source location type.

Values:

enumerator LOCAL_RELATIVE

Paths are sourced via plain paths. Resource locations will be constructed by contactenation of base path and the resources’ relative path.

enumerator LOCAL_CDN

Paths are sourced via CDN style paths. Resource locations will be constructed by contactenation of base path and the resources’ CDN location path.

enumerator REMOTE_CDN

Resources are downloaded. They will then be processed as ResourceSourceType::LOCAL_CDN.

struct ResourceSourceSettings

Parameters to represent where and how a resource is sourced.

Public Members

ResourceSourceType sourceType = ResourceSourceType::LOCAL_CDN

Specifies the type of resource location. See ResourceSourceType for more info.

std::vector<std::filesystem::path> basePaths

The base paths to locate resources.

enum class CarbonResources::ResourceDestinationType

Parameters to represent resource destinationlocation type.

Values:

enumerator LOCAL_RELATIVE

Paths are sourced via plain paths. Resource locations will be constructed by contactenation of base path and the resources’ relative path.

enumerator LOCAL_CDN

Paths are sourced via CDN style paths. Resource locations will be constructed by contactenation of base path and the resources’ CDN location path.

enumerator REMOTE_CDN

Resources are compressed. They will then be processed as LOCAL_CDN. Note that the library does not upload the resources, this functionality is external.

struct ResourceDestinationSettings

Parameters to represent where and how a resource is saved.

Public Members

ResourceDestinationType destinationType = ResourceDestinationType::LOCAL_CDN

Specifies the type of resource location. See ResourceDestinationType for more info.

std::filesystem::path basePath = ""

The base path to save resources.