class documentation
class RelativeDataPath(RootModel[
A relative path that is validated, and can have a Thing assigned to it.
Use set_saving_thing or set_saving_thing_if_unset to set the Thing whose data directory will be used for the final save.
Use the abs_data_path property to get the final path for saving.
| Class Method | validate |
Validate the relative path is relative and has no parent dir references. |
| Method | join |
Join a path to the end of this path. |
| Method | save |
Use a temporary directory to save raher than an OFMThing. |
| Method | set |
Set the Thing that is saving the data. |
| Method | set |
Set the Thing that is saving the data if it is not already set. |
| Property | abs |
The absolute data directory to save to. |
| Property | save |
Return True if the saving thing is set. |
| Instance Variable | _saving |
Undocumented |
@model_validator( mode='before')
@classmethod
def validate_relative_path(cls, value: @classmethod
str) -> str:
(source)
¶
Validate the relative path is relative and has no parent dir references.
Join a path to the end of this path.
| Returns | |
RelativeDataPath | A new RelativeDataPath object with the path appended. |
Use a temporary directory to save raher than an OFMThing.
| Returns | |
TemporaryDirectory | the TemporaryDirectory object. |
Set the Thing that is saving the data.
The thing can also be a TemporaryDirectory object.
This will set the data directory.