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

class IDirectory(ABC): (source)

Known subclasses: orionis.storage.Directory

View In Hierarchy

Define the contract for a directory on a storage disk.

A directory object encapsulates its canonical path and delegates every operation to the driver of the disk it belongs to. Listing methods always return domain objects — never plain strings.

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
@abstractmethod
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.
@abstractmethod
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.
@abstractmethod
async def create(self) -> IDirectory: (source)

Create the directory, including any missing parents.

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

Recursively delete the directory and its contents.

Returns
boolTrue if the directory existed and was removed.
@abstractmethod
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.
@abstractmethod
async def exists(self) -> bool: (source)

Check whether the directory exists on its disk.

Returns
boolTrue if the directory exists.
@abstractmethod
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.
@abstractmethod
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.
__slots__: tuple = (source)

Undocumented