Class FakeFS::File
In: lib/fakefs/file.rb
Parent: StringIO

FakeFS File class inherit StringIO

Methods

absolute_path   advise   atime   atime   autoclose?   basename   binmode?   binread   birthtime   birthtime   chmod   chmod   chown   chown   close_on_exec=   close_on_exec?   const_missing   ctime   ctime   delete   directory?   dirname   executable?   exist?   exists?   expand_path   extname   file?   flock   fnmatch?   foreach   ftype   ioctl   is_a?   join   link   lstat   lstat   mtime   mtime   new   path   read   read   read_nonblock   readlines   readlink   readpartial   realdirpath   realpath   rename   size   size   size?   split   stat   stat   sticky?   symlink   symlink?   sysseek   syswrite   to_io   to_path   umask   utime   write   write   write_nonblock   zero?  

Classes and Modules

Class FakeFS::File::Stat

Constants

MODES = [ READ_ONLY = 'r'.freeze, READ_WRITE = 'r+'.freeze, WRITE_ONLY = 'w'.freeze, READ_WRITE_TRUNCATE = 'w+'.freeze, APPEND_WRITE_ONLY = 'a'.freeze, APPEND_READ_WRITE = 'a+'.freeze
FILE_CREATION_MODES = (MODES - [READ_ONLY, READ_WRITE]).freeze
MODE_BITMASK = RealFile::RDONLY | RealFile::WRONLY | RealFile::RDWR | RealFile::APPEND | RealFile::CREAT | RealFile::EXCL | RealFile::NONBLOCK | RealFile::TRUNC | (RealFile.const_defined?(:NOCTTY) ? RealFile::NOCTTY : 0) | (RealFile.const_defined?(:SYNC) ? RealFile::SYNC : 0)
FILE_CREATION_BITMASK = RealFile::CREAT

External Aliases

exist? -> exists?
exist? -> readable?
  Assuming that everyone can read and write files
exist? -> writable?
delete -> unlink
fnmatch? -> fnmatch
pos= -> tell=
read -> sysread
fileno -> to_i

Attributes

path  [R] 

Public Class methods

Not exactly right, returns true if the file is chmod +x for owner. In the context of when you would use fakefs, this is usually what you want.

Assume nothing is sticky.

Public Instance methods

syswrite(str)

Alias for write

[Validate]