From: Mike Hall Date: 2002-04-18T05:26:04+09:00 Subject: Re: Help wanted for statvfs extension Daniel Berger wrote: > "James F.Hranicky" wrote in message > > "nobu.nokada@softhome.net" wrote: > > I guess that's a matter of personal taste. I like it, but perhaps > > FileSystem or FileSys would be better? > Ok - let's settle on Filesys. Seems intuitive and it's the same name > used on the Perl side of the world (Filesys::Statvfs). Oh, well... I just uploaded my version for the Linux 'statfs' and 'getmntent' calls. Might be OK for BSD, also? It's modeled after the standard 'etc' extension. http://www.enteract.com/~mghall/ruby/filesystem-0.1.tgz module FileSystem Filesystem.stat( directory ) Filesystem.mounts( optional file name ) Filesystem.mounts( optional file name ) { |mt| optional block } (the default 'mounts' filename is "/etc/mtab") Struct FSstat fs.path given directory path fs.bsize optimal transfer block size fs.blocks total data blocks in file system fs.bfree free blocks in file system fs.bavail free blocks avail to non-superuser fs.files total file nodes in file system fs.ffree free file nodes in file system fs.type numeric file system type fs.fsname name of file system type fs.namelen maximum length of filenames Struct FSmount mt.fsname file system (i.e. partition device) name mt.dir mount point directory mt.type file system type mt.options mount options mt.freq dump frequency in days mt.pass pass number of file system check (yeah, and I just found a typo in the README...) -- Mike Hall http://www.enteract.com/~mghall