Class Sys::Filesystem
In: ext/sys/filesystem.c
Parent: Object

The Filesystem class serves an abstract base class. It‘s methods return

  objects of other types. Do not instantiate.

Methods

mount_point   mounts   stat  

Classes and Modules

Class Sys::Filesystem::Mount
Class Sys::Filesystem::Stat

Constants

VERSION = 0.3.4   The version of this library (a String)

Public Class methods

Returns the mount point of the given file, or itself if it cannot be determined.

Example:

   Filesystem.mount_point('/home/djberge/some_file.txt') => '/home'

In block form, yields a Filesystem::Mount object for each mounted filesystem on your machine. In non-block form, returns an array of Filesystem::Mount objects instead.

Example:

   Filesystem.mounts{ |fs|
      p fs.name            # => e.g. '/dev/dsk/c0t0d0s0', 'proc', etc
      p fs.mount_time      # => e.g. Thu Dec 11 15:07:23 -0700 2008
      p fs.mount_type      # => e.g. 'ufs', 'proc', etc
      p fs.mount_point     # => e.g. '/', '/proc', '/tmp', etc
      p fs.options         # => e.g. "rw,intr,largefiles,logging,xattr,onerror=panic,dev=2200008"
      p fs.pass_number     # => e.g. ???
      p fs.dump_frequency  # => e.g. ???
   }

Returns a a Filesystem::Stat object containing information about the path file system.

[Validate]