arxiv.canonical.services.filesystem module

class arxiv.canonical.services.filesystem.CanonicalFilesystem(base_path)[source]

Bases: arxiv.canonical.services.filesystem.Filesystem, arxiv.canonical.core.ICanonicalStorage

Filesystem storage for the canonical record.

can_resolve(uri)[source]

Indicate whether or not the implementation can resolve an URI.

Parameters

uri (D.URI) –

Returns

Return type

bool

Return type

bool

can_store(key)[source]
Return type

bool

list_subkeys(key)[source]

List all of the subkeys for key in the record.

Return type

List[str]

load_entry(uri)[source]

Load an entry from the record.

Return type

Tuple[RecordStream, str]

load_manifest(key)[source]

Load an integrity manifest.

Return type

Manifest

store_entry(ri)[source]

Store an entry in the record.

Return type

None

store_manifest(key, manifest)[source]

Store an integrity manifest.

Return type

None

class arxiv.canonical.services.filesystem.Filesystem(base_path)[source]

Bases: arxiv.canonical.core.ICanonicalSource

Retrieves content from a filesystem (outside the canonical record).

can_resolve(uri)[source]

Indicate whether or not the implementation can resolve an URI.

Parameters

uri (D.URI) –

Returns

Return type

bool

Return type

bool

load(uri)[source]

Make an IO that waits to load from the record until it is read().

Return type

IO[bytes]