| Class | Sys::Filesystem::Stat |
| In: |
lib/sys/unix/sys/filesystem.rb
lib/sys/filesystem.rb lib/sys/windows/sys/filesystem.rb |
| Parent: | Object |
Stat objects are returned by the Sys::Filesystem.stat method.
| RDONLY | = | 1 | Read-only filesystem | |
| NOSUID | = | 2 | Filesystem does not support suid or sgid semantics. | |
| NOTRUNC | = | 3 | Filesystem does not truncate file names longer than name_max. |
| files | -> | inodes |
| files_free | -> | inodes_free |
| files_available | -> | inodes_available |
| files | -> | inodes |
| files_free | -> | inodes_free |
| files_available | -> | inodes_available |
| base_type | [RW] | The filesystem type, e.g. UFS. |
| base_type | [R] | The file system type, e.g. NTFS, FAT, etc. |
| block_size | [RW] | The preferred system block size. |
| block_size | [R] | The file system block size. MS Windows typically defaults to 4096. |
| blocks | [R] | The total number of blocks available (used or unused) on the file system. |
| blocks | [RW] | The total number of fragment_size blocks in the filesystem. |
| blocks_available | [R] | The total number of unused blocks available to unprivileged processes. |
| blocks_available | [RW] | The number of free blocks available to unprivileged processes. |
| blocks_free | [R] | The total number of unused blocks. |
| blocks_free | [RW] | The total number of free blocks in the filesystem. |
| bytes_available | [R] | The amount of free space available to unprivileged processes. |
| bytes_free | [R] | The total amount of free space on the partition. |
| files | [R] | Total number of files/inodes that can be created on the file system. This attribute is always nil on MS Windows. |
| files | [RW] | The total number of files/inodes that can be created. |
| files_available | [R] | Total number of available files/inodes for unprivileged processes that can be created on the file system. This attribute is always nil on MS Windows. |
| files_available | [RW] | The number of free files/inodes available to unprivileged processes. |
| files_free | [R] | Total number of free files/inodes that can be created on the file system. This attribute is always nil on MS Windows. |
| files_free | [RW] | The total number of files/inodes on the filesystem. |
| filesystem_id | [RW] | The filesystem identifier. |
| filesystem_id | [R] | The file system volume id. |
| flags | [R] | A bit mask of file system flags. |
| flags | [RW] | A bit mask of flags. |
| fragment_size | [RW] | The fragment size, i.e. fundamental filesystem block size. |
| fragment_size | [R] | Fragment size. Meaningless at the moment. |
| name_max | [RW] | The maximum length of a file name permitted on the filesystem. |
| name_max | [R] | The maximum length of a file name permitted on the file system. |
| path | [R] | The path of the file system. |
| path | [RW] | The path of the filesystem. |
Creates a new Sys::Filesystem::Stat object. This is meant for internal use only. Do not instantiate directly.
Returns true if the filesystem is case sensitive for the current path. Typically this will be any path on MS Windows or Macs using HFS.
For a root path (really any path without actual a-z characters) we take a best guess based on the host operating system. However, as a general rule, I do not recommend using this method for a root path.