# 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
# 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
# File lib/fakefs/fake/file.rb, line 45 def content=(str) @inode.content = str end
# File lib/fakefs/fake/file.rb, line 76 def delete inode.unlink(self) parent.delete(self) end
# File lib/fakefs/fake/file.rb, line 64 def entry self end
# File lib/fakefs/fake/file.rb, line 68 def inspect "(FakeFile name:#{name.inspect} parent:#{parent.to_s.inspect} size:#{content.size})" end
# File lib/fakefs/fake/file.rb, line 53 def link(other_file) @inode.link(other_file) end
# File lib/fakefs/fake/file.rb, line 49 def links @inode.links end
# File lib/fakefs/fake/file.rb, line 72 def to_s File.join(parent.to_s, name) end