#include <CscResources.h>
◆ CscResources()
| conscience_core::core_objects::resources::CscResources::CscResources |
( |
CscResources && |
| ) |
|
◆ ~CscResources()
| virtual conscience_core::core_objects::resources::CscResources::~CscResources |
( |
| ) |
|
|
virtualdefault |
◆ checkIfPathExistOnDrive()
| bool conscience_core::core_objects::resources::CscResources::checkIfPathExistOnDrive |
( |
const CscResourceSpec & |
spec | ) |
|
◆ getInternalPath()
| fs::path conscience_core::core_objects::resources::CscResources::getInternalPath |
( |
const CscResourceSpec & |
spec | ) |
|
|
noexcept |
WARNING To be used very carefully - this returns / exposes resources internal cache directory, and should therefore be used with the greatest attention. This will return the direct path to the document. This provides a good way of optimizing (to avoid copy) but requires caution.
- Parameters
-
| spec | resource locator spec |
- Note
- If spec supports & specifies protection unlock data, it will be used to grant this operation.
- Returns
- Internal resource path. File should not be deleted or modified, unless it's sure that there is absolutely no problem.
- Exceptions
-
◆ getLastModificationTime()
| unsigned long long conscience_core::core_objects::resources::CscResources::getLastModificationTime |
( |
const CscResourceSpec & |
spec | ) |
|
|
noexcept |
- Parameters
-
| spec | resource locator spec |
- Note
- If spec supports & specifies protection unlock data, it will be used to grant this operation.
-
If remote resource, will be downloaded first
- Returns
- Last modification time of resource, timestamp millis
- Exceptions
-
◆ Instance()
| CscResources & conscience_core::core_objects::resources::CscResources::Instance |
( |
| ) |
|
|
static |
◆ publish()
| void conscience_core::core_objects::resources::CscResources::publish |
( |
const CscResourceSpec & |
spec, |
|
|
const string & |
content |
|
) |
| |
|
noexcept |
Publishes new content for given resource spec.
- Parameters
-
| spec | resource locator spec |
- Note
- If spec supports & specifies protection, it will be used to protect resources
- Exceptions
-
◆ remove()
| void conscience_core::core_objects::resources::CscResources::remove |
( |
const CscResourceSpec & |
spec | ) |
|
|
noexcept |
Removes resource denoted by given spec, if possible
- Parameters
-
| spec | resource locator spec |
- Note
- If spec supports & specifies protection unlock data, it will be used to grant this operation.
- Exceptions
-
◆ resolveAndExportToFile()
| void conscience_core::core_objects::resources::CscResources::resolveAndExportToFile |
( |
const CscResourceSpec & |
spec, |
|
|
const fs::path & |
outPath |
|
) |
| |
|
noexcept |
Provide the requested resource to given path. Overwrites any existing file
- Note
- If spec supports & specifies protection unlock data, it will be used to grant this operation.
- Parameters
-
| spec | resource locator spec |
| outPath | fs path to which write the file |
- Exceptions
-
◆ resolveAsBytes()
| vector< unsigned char > conscience_core::core_objects::resources::CscResources::resolveAsBytes |
( |
const CscResourceSpec & |
spec | ) |
|
|
noexcept |
Returns resource's content as bytes vector
- Parameters
-
| spec | resource locator spec |
- Returns
- content as bytes vector
- Exceptions
-
◆ resolveAsStream()
| ifstream conscience_core::core_objects::resources::CscResources::resolveAsStream |
( |
const CscResourceSpec & |
spec | ) |
|
|
noexcept |
WARNING: returned stream must be closed
- Parameters
-
| spec | resource locator spec |
- Returns
- a stream to given resource
- Exceptions
-
◆ resolveAsString()
| string conscience_core::core_objects::resources::CscResources::resolveAsString |
( |
const CscResourceSpec & |
spec | ) |
|
|
noexcept |
- Note
- If spec supports & specifies protection unlock data, it will be used to grant this operation.
- Parameters
-
| spec | resource locator spec |
- Returns
- the content of the resource as string
- Exceptions
-
The documentation for this class was generated from the following files: