- CLASS FakeFS::FakeFile::Inode
[RW] | name | |
[RW] | parent | |
[RW] | content | |
[R] | ctime | |
[R] | mtime | |
[RW] | inode |
Source: show
# File lib/fakefs/fake/file.rb, line 31 def initialize(name = nil, parent = nil) @name = name @parent = parent @inode = Inode.new(self) @ctime = Time.now @mtime = @ctime end
Source: show
# File lib/fakefs/fake/file.rb, line 57 def clone(parent = nil) clone = super() clone.parent = parent if parent clone.inode = inode.clone clone end
Source: show
# File lib/fakefs/fake/file.rb, line 41 def content @inode.content end
Source: show
# File lib/fakefs/fake/file.rb, line 45 def content=(str) @inode.content = str end
Source: show
# File lib/fakefs/fake/file.rb, line 76 def delete inode.unlink(self) parent.delete(self) end
Source: show
# File lib/fakefs/fake/file.rb, line 64 def entry self end
Source: show
# File lib/fakefs/fake/file.rb, line 68 def inspect "(FakeFile name:#{name.inspect} parent:#{parent.to_s.inspect} size:#{content.size})" end
Source: show
# File lib/fakefs/fake/file.rb, line 53 def link(other_file) @inode.link(other_file) end
Source: show
# File lib/fakefs/fake/file.rb, line 49 def links @inode.links end
Source: show
# File lib/fakefs/fake/file.rb, line 72 def to_s File.join(parent.to_s, name) end