= Description A Ruby interface for getting filesystem information. = Synopsis require 'sys/filesystem' include Sys p Filesystem.stat("/") # => Sys::Filesystem::Stat object Filesystem.mounts{ |mount| p mount } = Constants == Sys::Filesystem VERSION The version of this package, returned as a string. == Sys::Filesystem::Stat RDONLY Read only filesystem. See the +flags+ method for more information. NOSUID Filesystem does not support suid or sgid semantics. See the +flags+ method for more information. NOTRUNC Filesystem does not truncate file names longer than +name_max+. Not supported on all platforms. See the +flags+ method for more information. = Class Methods === Sys::Filesystem Sys::Filesystem.stat(path) Returns a Filesystem::Stat object containing information about the +path+ filesystem. Sys::Filesystem.mounts Returns an array of Filesystem::Mount objects containing information about the mount points available on your system. In block form this method yields each Mount object in turn instead of returning an array. = Instance Methods === Sys::Filesystem::Mount name The name of the mounted resource. On MS Windows this is the device mapping. mount_time The last time the volume was mounted. On MS Windows this is your system's boot time. mount_type The type of mount, e.g. NFS, NTFS. mount_point The volume mount point. On MS Windows this is the volume letter. options A list of comma separated options that denote properties of the volume. pass_number The number of the filesystem check, or nil if not present. This is always nil on MS Windows. frequency The dump frequency in days, or nil if not present or supported. This is always nil on MS Windows. === Sys::Filesystem::Stat base_type The filesystem type, e.g. UFS. block_size The preferred system block size. blocks The total number of +fragment_size+ blocks in the filesystem. blocks_available The number of free blocks available to unprivileged processes. blocks_free The total number of free blocks in the filesystem. files The total number of files/inodes that can be created. files_free The total number of free files/inodes on the file system. filesystem_id The filesystem identifier. flags A bit mask of flags. See the 'Constants' section for a list of flags. fragment_size The fragment size, i.e. fundamental file system block size. inodes Alias for +files+. inodes_free Alias for +files_free+. inodes_available Alias for +files_available+. name_max The maximum length of a file name permitted on the file system. path The path of the filesystem. = Fixnum helper methods Fixnum#to_gb Returns a number in terms of gigabytes. Fixnum#to_kb Returns a number in terms of kilobytes Fixnum#to_mb Returns a number in terms of megabytes == Known Bugs None that I am aware of. Please log any bugs you find on the project website at http://www.rubyforge.org/projects/sysutils. == License Ruby's == Copyright Copyright 2002-2008, Daniel J. Berger All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Ruby itself. == Warranty This library is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose. == Acknowledgements Mike Hall for his original source code. == Author Daniel J. Berger djberg96 at nospam at gmail dot com imperator on IRC (Freenode) == See Also mount