Skip to content

textual_fspicker.path_maker

Helper code for making a fresh Path instance.

Allows the user of the library to specify their preference for the Path class to use when making a fresh Path instance. Designed to allow the use of other Path-derived classes, such as UPath, without needing to make them dependencies of this library.

MakePath

Utility class for setting and getting the Path builder.

of classmethod

of(out_of='')

Make a Path out of the given value.

Parameters:

Name Type Description Default

out_of

str | Path

The value to make a path out of.

''

Returns:

Type Description
Path

An instance of a Path or a related class.

using classmethod

using(path_maker)

Set the builder callable to use when making a path.

Parameters:

Name Type Description Default

path_maker

Callable[[str | Path], Path]

The callable to set as the Path builder.

required