Esempio n. 1
0
 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))
Esempio n. 2
0
 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))
Esempio n. 3
0
    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))
Esempio n. 4
0
    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))
Esempio n. 5
0
 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
Esempio n. 6
0
 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