From: Daniel Berger Date: 2002-04-18T06:26:09+09:00 Subject: Re: Help wanted for statvfs extension "Mike Hall" wrote in message news:3CBDD8A7.79725D37@enteract.com... > 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. So *now* you jump into the conversation. :-P Guess I can stop working on this now. Oh, well. At least I learned something about extending Ruby. :) I'll take a look. Making it BSD portable will probably be desired by some folks out there, though it's not an issue for me personally. Thanks. Dan > > 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