Sha256: 1d73cad87ccdda3a3273fe1cefe85ee83dfa67db6fa45d51110b4b83a1e6eaa3
Contents?: true
Size: 613 Bytes
Versions: 7
Compression:
Stored size: 613 Bytes
Contents
# frozen_string_literal: true 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
7 entries across 7 versions & 1 rubygems