def rename(self, src, dst): """ Rename the file or directory from src to dst. """ ret = api.glfs_rename(self.fs, src, dst) if ret < 0: err = ctypes.get_errno() raise OSError(err, os.strerror(err))
def rename(self, src, dst): """ Rename the file or directory from src to dst. If dst is a directory, OSError will be raised. If dst exists and is a file, it will be replaced silently if the user has permission. :raises: OSError on failure """ ret = api.glfs_rename(self.fs, src, dst) if ret < 0: err = ctypes.get_errno() raise OSError(err, os.strerror(err))
def rename(self, opath, npath): ret = api.glfs_rename(self.fs, opath, npath) if ret < 0: err = ctypes.get_errno() raise OSError(err, os.strerror(err)) return ret