Method filesystem_stat()


Method filesystem_stat

mapping(string:int) filesystem_stat(string path)

Description

Returns a mapping describing the properties of the filesystem containing the path specified by path.

Returns

If a filesystem cannot be determined 0 (zero) will be returned.

Otherwise a mapping(string:int) with the following fields will be returned:

"blocksize" : int

Size in bytes of the filesystem blocks.

"blocks" : int

Size of the entire filesystem in blocks.

"bfree" : int

Number of free blocks in the filesystem.

"bavail" : int

Number of available blocks in the filesystem. This is usually somewhat less than the "bfree" value, and can usually be adjusted with eg tunefs(1M).

"files" : int

Total number of files (aka inodes) allowed by this filesystem.

"ffree" : int

Number of free files in the filesystem.

"favail" : int

Number of available files in the filesystem. This is usually the same as the "ffree" value, and can usually be adjusted with eg tunefs(1M).

"fsname" : string

Name assigned to the filesystem. This item is not available on all systems.

"fstype" : string

Type of filesystem (eg "nfs"). This item is not available on all systems. For some more uncommon filesystems this may be an integer representing the magic number for the filesystem type (cf statfs(2) on eg Linux systems).

Note

Please note that not all members are present on all OSs.

See also

file_stat()