statvfs clearance
Albert Hopkins
marduk at letterboxes.org
Sat Apr 4 10:46:09 EDT 2009
On Sat, 2009-04-04 at 15:48 +0200, Hrvoje Niksic wrote:
> Sreejith K <sreejithemk at gmail.com> writes:
>
> > Python's statvfs module contains the following indexes to use with
> > os.statvfs() that contains the specified information
> >
> > statvfs.F_BSIZE
> > Preferred file system block size.
> [...]
> > statvfs.F_NAMEMAX
> > Maximum file name length.
> >
> > Can anyone tell me (or give me some links to know) what are these
> > values ? The first three I know, I need to know about the rest....
>
> You can simply print them, they are integers:
>
> >>> import statvfs
> >>> statvfs.F_FLAG
> 8
> --
Oh, did the OP mean the values of the indices? Yeah, of course you can
just print them. Or even look at statvfs.py. It's a whopping 15 lines:
"""Constants for interpreting the results of os.statvfs() and
os.fstatvfs()."""
# Indices for statvfs struct members in the tuple returned by
# os.statvfs() and os.fstatvfs().
F_BSIZE = 0 # Preferred file system block size
F_FRSIZE = 1 # Fundamental file system block size
F_BLOCKS = 2 # Total number of file system blocks (FRSIZE)
F_BFREE = 3 # Total number of free blocks
F_BAVAIL = 4 # Free blocks available to non-superuser
F_FILES = 5 # Total number of file nodes
F_FFREE = 6 # Total number of free file nodes
F_FAVAIL = 7 # Free nodes available to non-superuser
F_FLAG = 8 # Flags (see your local statvfs man page)
F_NAMEMAX = 9 # Maximum file name length
More information about the Python-list
mailing list