file_path
Construct a path to a file or paths to files
Parameters
| *args |
|
Paths, subfolders and files of either length 1 or a list with a fixed length. See the examples. |
() |
Returns
|
Union[str, List[str]] |
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'])