Sha256: 19049bdcbe7d21e0d8e92692f961a321f3e6df267282ba968b43e5f54d3e347b
Contents?: true
Size: 582 Bytes
Versions: 22
Compression:
Stored size: 582 Bytes
Contents
module BrowseEverything class FileEntry attr_reader :id, :location, :name, :size, :mtime, :type def initialize(id, location, name, size, mtime, container, type=nil) @id = id @location = location @name = name @size = size @mtime = mtime @container = container @type = type || @container ? 'application/x-directory' : Rack::Mime.mime_type(File.extname(name)) end def relative_parent_path? name =~ /^\.\.?$/ ? true : false end def container? @container end end end
Version data entries
22 entries across 22 versions & 1 rubygems