lories.core.configs.directories#

Classes#

Directory

PurePath subclass that can make system calls.

PosixDirectory

PurePath subclass that can make system calls.

WindowsDirectory

PurePath subclass that can make system calls.

Module Contents#

class lories.core.configs.directories.Directory(*dirs: str, base: str | Directory | None = None, default: str | None = None)[source]#

Bases: pathlib.Path

Inheritance diagram of lories.core.configs.directories.Directory

PurePath subclass that can make system calls.

Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa.

Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object.

joinpath(*paths: LiteralString | str | pathlib.Path) Directory[source]#

Combine this path with one or several arguments, and return a new path representing either a subpath (if all arguments are relative paths) or a totally different path (if one of the arguments is anchored).

relative_to(path: LiteralString | str | pathlib.Path, *_, walk_up=False) pathlib.Path[source]#

Return the relative path to another path identified by the passed arguments. If the operation is not possible (because this is not a subpath of the other path), raise ValueError.

class lories.core.configs.directories.PosixDirectory(*dirs: str, base: str | Directory | None = None, default: str | None = None)[source]#

Bases: Directory, pathlib.PosixPath

Inheritance diagram of lories.core.configs.directories.PosixDirectory

PurePath subclass that can make system calls.

Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa.

Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object.

class lories.core.configs.directories.WindowsDirectory(*dirs: str, base: str | Directory | None = None, default: str | None = None)[source]#

Bases: Directory, pathlib.WindowsPath

Inheritance diagram of lories.core.configs.directories.WindowsDirectory

PurePath subclass that can make system calls.

Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa.

Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object.