class BFS::FileInfo

Public Class Methods

new(**attrs) click to toggle source
Calls superclass method
# File lib/bfs.rb, line 6
def initialize(**attrs)
  super(nil)

  update(size: 0, mtime: Time.at(0), mode: 0, metadata: {})
  update(attrs)
end

Public Instance Methods

content_type() click to toggle source
# File lib/bfs.rb, line 21
def content_type
  fetch(:content_type, nil)
end
metadata() click to toggle source
# File lib/bfs.rb, line 33
def metadata
  fetch(:metadata, {})
end
mode() click to toggle source
# File lib/bfs.rb, line 29
def mode
  fetch(:mode, 0)
end
mtime() click to toggle source
# File lib/bfs.rb, line 25
def mtime
  fetch(:mtime, Time.at(0))
end
path() click to toggle source
# File lib/bfs.rb, line 13
def path
  fetch(:path, nil)
end
size() click to toggle source
# File lib/bfs.rb, line 17
def size
  fetch(:size, 0)
end