Sha256: c1ed9436443b1e158728f4e9ba77166553809376ff3257b121f47e193ab74efb
Contents?: true
Size: 1.03 KB
Versions: 56
Compression:
Stored size: 1.03 KB
Contents
require 'sys-uname' module RealFS attr_reader :guestOS def fs_init if Sys::Platform::IMPL == :linux self.fsType = `df -lT / | tail -1 | awk '{ print $2 }'` @guestOS = "Linux" end end def fs_dirEntries(p) Dir.entries(p) end def fs_fileExists?(p) File.exist?(p) end def fs_fileFile?(p) File.file?(p) end def fs_fileDirectory?(p) File.directory?(p) end def fs_fileSize(p) File.size(p) end def fs_fileSize_obj(fobj) fobj.stat.size end def fs_fileAtime(p) File.atime(p) end def fs_fileCtime(p) File.ctime(p) end def fs_fileMtime(p) File.mtime(p) end def fs_fileAtime_obj(fobj) fobj.atime end def fs_fileCtime_obj(fobj) fobj.ctime end def fs_fileMtime_obj(fobj) fobj.mtime end def fs_fileOpen(p, mode = "r") File.new(p, mode) end def fs_fileSeek(fobj, offset, whence) fobj.seek(offset, whence) end def fs_fileRead(fobj, len) fobj.read(len) end def fs_fileClose(fobj) fobj.close end end
Version data entries
56 entries across 56 versions & 1 rubygems