file_path

file_path(*args)

Construct a path to a file or paths to files

Args: *args (str | List[str]): Paths, subfolders and files of either length 1 or a list with a fixed length. See the examples.

Returns: a str with the path to a file or a list of paths to files

Examples: >>> from rlike import * >>> x = file_path(tempdir(), ‘level1’, ‘level2’, ‘myfile.txt’) >>> x = file_path(tempdir(), ‘level1’, ‘level2’, [‘myfile.txt’, ‘test.pickle’]) >>> x = file_path([tempdir(), tempdir()], [‘myfile.txt’, ‘test.pickle’])