data_tools.schema.FileLoader#
- class data_tools.schema.FileLoader(loader: Callable[[CanonicalPath], Result[File]], canonical_path: CanonicalPath)#
Bases:
objectA callable object that wraps a lambda function to acquire a File, as well as the canonical path that will be queried for the File in question.
- __init__(loader: Callable[[CanonicalPath], Result[File]], canonical_path: CanonicalPath) None#
Wrap a loader along with the canonical_path that it will be querying.
- Parameters:
loader – A single argument lambda expecting a canonical path that will return either a File wrapped in a Result or raise a FileNotFoundError.
canonical_path – The path that the lambda will be querying.
Methods
__init__(loader, canonical_path)Wrap a loader along with the canonical_path that it will be querying.
Attributes
- property canonical_path: CanonicalPath#