ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Represent a directory on a storage disk.

The object encapsulates its canonical path and the driver of the disk it belongs to. Listing methods always return ~orionis.storage.file.File and Directory objects — never plain strings.

Method __init__ Initialize the directory with its driver and canonical path.
Async Method allDirectories List every directory contained in the directory tree.
Async Method allFiles List every file contained in the directory tree.
Async Method create Create the directory, including any missing parents.
Async Method delete Recursively delete the directory and its contents.
Async Method directories List the directories directly contained in the directory.
Async Method exists Check whether the directory exists on its disk.
Async Method files List the files directly contained in the directory.
Method path Return the canonical root-relative path of the directory.
Class Variable __slots__ Undocumented
Instance Variable _driver Undocumented
Instance Variable _path Undocumented
def __init__(self, driver: IStorageDriver, path: str = ''): (source)

Initialize the directory with its driver and canonical path.

Parameters
driver:IStorageDriverDriver of the disk that owns the directory.
path:strRoot-relative directory path; normalized on ingestion. The empty string denotes the disk root.
Returns
NoneUndocumented
Raises
StoragePathExceptionIf path is invalid or escapes the disk root.
async def allDirectories(self) -> list[IDirectory]: (source)

List every directory contained in the directory tree.

Returns
list[IDirectory]Directory objects for all nested directories, sorted by path.
async def allFiles(self) -> list[IFile]: (source)

List every file contained in the directory tree.

Returns
list[IFile]File objects for all nested files, sorted by path.
async def create(self) -> IDirectory: (source)

Create the directory, including any missing parents.

Returns
IDirectoryThe directory itself, enabling fluent chaining.
async def delete(self) -> bool: (source)

Recursively delete the directory and its contents.

Returns
boolTrue if the directory existed and was removed.
async def directories(self) -> list[IDirectory]: (source)

List the directories directly contained in the directory.

Returns
list[IDirectory]Directory objects for every direct child directory, sorted by path.
async def exists(self) -> bool: (source)

Check whether the directory exists on its disk.

Returns
boolTrue if the directory exists.
async def files(self) -> list[IFile]: (source)

List the files directly contained in the directory.

Returns
list[IFile]File objects for every direct child file, sorted by path.
def path(self) -> str: (source)

Return the canonical root-relative path of the directory.

Returns
strNormalized path relative to the disk root. The empty string denotes the disk root itself.

Undocumented

Undocumented