Skip to main content

get_random_local_path

Use file_path_or_file_name, when you want a random directory, but want to preserve the leaf file name

def get_random_local_path(file_path_or_file_name: pathlib.Path | str | None = None) -> pathlib.Path: ...

Use file_path_or_file_name, when you want a random directory, but want to preserve the leaf file name

Parameters​

NameTypeDescription
file_path_or_file_name`pathlib.Pathstr

Returns​

TypeDescription
pathlib.PathThe generated local path pointing to either a random directory or a file within a random directory.