Sha256: 30ee6c783f6eb9a200a7cea0fe5e24fa9f96d03acbc7fd4abb7bea9b20107d5c

Contents?: true

Size: 486 Bytes

Versions: 10

Compression:

Stored size: 486 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 ? 'directory' : Rack::Mime.mime_type(File.extname(name))
    end

    def container?
      @container
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
browse-everything-0.4.5 lib/browse_everything/file_entry.rb
browse-everything-0.4.4 lib/browse_everything/file_entry.rb
browse-everything-0.4.3 lib/browse_everything/file_entry.rb
browse-everything-0.4.2 lib/browse_everything/file_entry.rb
browse-everything-0.4.1 lib/browse_everything/file_entry.rb
browse-everything-0.4.0 lib/browse_everything/file_entry.rb
browse-everything-0.3.0 lib/browse_everything/file_entry.rb
browse-everything-0.2.0 lib/browse_everything/file_entry.rb
browse-everything-0.1.1 lib/browse_everything/file_entry.rb
browse-everything-0.1.0 lib/browse_everything/file_entry.rb