Methods
- D
- N
- S
Attributes
[R] | ctime | |
[R] | mtime |
Class Public methods
Source: show
# File lib/fakefs/file.rb, line 192 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
Instance Public methods
Source: show
# File lib/fakefs/file.rb, line 208 def directory? File.directory?(@file) end
Source: show
# File lib/fakefs/file.rb, line 212 def nlink @fake_file.links.size end
Source: show
# File lib/fakefs/file.rb, line 216 def size if @__lstat && symlink? @fake_file.target.size else File.size(@file) end end
Source: show
# File lib/fakefs/file.rb, line 204 def symlink? File.symlink?(@file) end