Parent

Files

FakeFS::File::Stat

Attributes

ctime[R]
mtime[R]

Public Class Methods

new(file, __lstat = false) click to toggle source
# File lib/fakefs/file.rb, line 230
def initialize(file, __lstat = false)
  if !File.exists?(file)
    raise(Errno::ENOENT, "No such file or directory - #{file}")
  end

  @file      = file
  @fake_file = FileSystem.find(@file)
  @__lstat   = __lstat
  @ctime     = @fake_file.ctime
  @mtime     = @fake_file.mtime
end

Public Instance Methods

directory?() click to toggle source
# File lib/fakefs/file.rb, line 246
def directory?
  File.directory?(@file)
end
size() click to toggle source
# File lib/fakefs/file.rb, line 254
def size
  if @__lstat && symlink?
    @fake_file.target.size
  else
    File.size(@file)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.