Пример #1
0
 def statvfs(self, path):
     """
     Returns information about a mounted glusterfs volume. path is the
     pathname of any file within the mounted filesystem.
     """
     s = api.Statvfs()
     rc = api.glfs_statvfs(self.fs, path, ctypes.byref(s))
     if rc < 0:
         err = ctypes.get_errno()
         raise OSError(err, os.strerror(err))
     return s
Пример #2
0
 def statvfs(self, path):
     """
     Returns information about a mounted glusterfs volume. path is the
     pathname of any file within the mounted filesystem.
     """
     s = api.Statvfs()
     rc = api.glfs_statvfs(self.fs, path, ctypes.byref(s))
     if rc < 0:
         err = ctypes.get_errno()
         raise OSError(err, os.strerror(err))
     return s
Пример #3
0
 def statvfs(self, path):
     """
     To get status information about the file system that contains the file
     named by the path argument.
     """
     s = api.Statvfs()
     rc = api.glfs_statvfs(self.fs, path, ctypes.byref(s))
     if rc < 0:
         err = ctypes.get_errno()
         raise OSError(err, os.strerror(err))
     return s
Пример #4
0
 def statvfs(self, path):
     """
     To get status information about the file system that contains the file
     named by the path argument.
     """
     s = api.Statvfs()
     rc = api.glfs_statvfs(self.fs, path, ctypes.byref(s))
     if rc < 0:
         err = ctypes.get_errno()
         raise OSError(err, os.strerror(err))
     return s
Пример #5
0
    def statvfs(self, path):
        """
        Returns information about a mounted glusterfs volume. path is the
        pathname of any file within the mounted filesystem.

        :returns: An object whose attributes describe the filesystem on the
                  given path, and correspond to the members of the statvfs
                  structure, namely: f_bsize, f_frsize, f_blocks, f_bfree,
                  f_bavail, f_files, f_ffree, f_favail, f_fsid, f_flag,
                  and f_namemax.

        :raises: OSError on failure
        """
        s = api.Statvfs()
        rc = api.glfs_statvfs(self.fs, path, ctypes.byref(s))
        if rc < 0:
            err = ctypes.get_errno()
            raise OSError(err, os.strerror(err))
        return s
Пример #6
0
    def statvfs(self, path):
        """
        Returns information about a mounted glusterfs volume. path is the
        pathname of any file within the mounted filesystem.

        :returns: An object whose attributes describe the filesystem on the
                  given path, and correspond to the members of the statvfs
                  structure, namely: f_bsize, f_frsize, f_blocks, f_bfree,
                  f_bavail, f_files, f_ffree, f_favail, f_fsid, f_flag,
                  and f_namemax.

        :raises: OSError on failure
        """
        s = api.Statvfs()
        rc = api.glfs_statvfs(self.fs, path, ctypes.byref(s))
        if rc < 0:
            err = ctypes.get_errno()
            raise OSError(err, os.strerror(err))
        return s