chdir#

chdir(newdir: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path]) None[source]#

Change current directory, used as a context manager, ie:

>>> folder = r"C:/"
>>> with chdir(folder):
>>>     print(os.getcwd())
'C:/'
Parameters

newdir (str) – New directory