Class: MiqFile
- Inherits:
-
Object
- Object
- MiqFile
- Defined in:
- lib/fs/MiqFS/MiqFS.rb
Instance Attribute Summary collapse
-
#fobj ⇒ Object
Returns the value of attribute fobj.
-
#fs ⇒ Object
Returns the value of attribute fs.
Instance Method Summary collapse
- #atime ⇒ Object
- #close ⇒ Object
- #ctime ⇒ Object
-
#initialize(fs, fobj) ⇒ MiqFile
constructor
A new instance of MiqFile.
- #mtime ⇒ Object
- #read(len = -1)) ⇒ Object
- #seek(amt, whence = IO::SEEK_SET) ⇒ Object
- #size ⇒ Object
- #write(buf, len = buf.length) ⇒ Object
Constructor Details
#initialize(fs, fobj) ⇒ MiqFile
Returns a new instance of MiqFile.
478 479 480 481 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 478 def initialize(fs, fobj) @fs = fs @fobj = fobj end |
Instance Attribute Details
#fobj ⇒ Object
Returns the value of attribute fobj.
476 477 478 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 476 def fobj @fobj end |
#fs ⇒ Object
Returns the value of attribute fs.
476 477 478 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 476 def fs @fs end |
Instance Method Details
#atime ⇒ Object
504 505 506 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 504 def atime @fs.fileAtime_obj(@fobj) end |
#close ⇒ Object
496 497 498 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 496 def close @fs.fs_fileClose(@fobj) end |
#ctime ⇒ Object
508 509 510 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 508 def ctime @fs.fileCtime_obj(@fobj) end |
#mtime ⇒ Object
512 513 514 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 512 def mtime @fs.fileMtime_obj(@fobj) end |
#read(len = -1)) ⇒ Object
487 488 489 490 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 487 def read(len = -1) return(@fs.fs_fileRead(@fobj, len)) if len >= 0 (@fs.fs_fileRead(@fobj, size)) end |
#seek(amt, whence = IO::SEEK_SET) ⇒ Object
483 484 485 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 483 def seek(amt, whence = IO::SEEK_SET) @fs.fs_fileSeek(@fobj, amt, whence) end |
#size ⇒ Object
500 501 502 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 500 def size @fs.fs_fileSize_obj(@fobj) end |
#write(buf, len = buf.length) ⇒ Object
492 493 494 |
# File 'lib/fs/MiqFS/MiqFS.rb', line 492 def write(buf, len = buf.length) return(@fs.fs_fileWrite(@fobj, buf, len)) if len >= 0 end |