cd_up
- mdtools.file_handler.cd_up(n, path=__file__)[source]
Move n steps upwards in the directory tree.
- Parameters:
n (
int) – Number of steps to go up in the directory tree.path (
strorbytesoros.PathLike, optional) – Directory or file to use as start. Default: Position of the file from which this function is called (__file__).
- Returns:
p (
str) – The n-th parent directory of path.