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 | all |
List every directory contained in the directory tree. |
| Async Method | all |
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 |
Initialize the directory with its driver and canonical path.
| Parameters | |
driver:IStorageDriver | Driver of the disk that owns the directory. |
path:str | Root-relative directory path; normalized on ingestion. The empty string denotes the disk root. |
| Returns | |
None | Undocumented |
| Raises | |
StoragePathException | If path is invalid or escapes the disk root. |
List every directory contained in the directory tree.
| Returns | |
list[IDirectory] | Directory objects for all nested directories, sorted by path. |
Create the directory, including any missing parents.
| Returns | |
IDirectory | The directory itself, enabling fluent chaining. |
Recursively delete the directory and its contents.
| Returns | |
bool | True if the directory existed and was removed. |
List the directories directly contained in the directory.
| Returns | |
list[IDirectory] | Directory objects for every direct child directory, sorted by path. |
Return the canonical root-relative path of the directory.
| Returns | |
str | Normalized path relative to the disk root. The empty string denotes the disk root itself. |