def _set_cwd()

in iopath/common/file_io.py [0:0]


    def _set_cwd(self, path: Union[str, None], **kwargs: Any) -> bool:
        self._check_kwargs(kwargs)
        # Remove cwd path if None
        if path is None:
            self._cwd = None
            return True

        # Make sure path is a valid Unix path
        if not os.path.exists(path):
            raise ValueError(f"{path} is not a valid Unix path")
        # Make sure path is an absolute path
        if not os.path.isabs(path):
            raise ValueError(f"{path} is not an absolute path")
        self._cwd = path
        return True