class Alchemy::Custom::Model::ElFinder::Volumes::AlchemyFiles

Public Class Methods

new(options = {root: '/files', name: 'Alchemy Library - Files', id: 'alchemy_library_files', url: '/'}) click to toggle source
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 5
def initialize(options = {root: '/files', name: 'Alchemy Library - Files', id: 'alchemy_library_files', url: '/'})
  super
end

Public Instance Methods

decode(hash) click to toggle source
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 13
def decode(hash)
  super do |path|
    Paths::File.new(@root, path, volume: self)
  end
end
disabled_commands() click to toggle source
Calls superclass method
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 36
def disabled_commands

  super + ['rm']

end
files(target = '.') click to toggle source
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 9
def files(target = '.')
  super(root_path)
end
upload(target, upload) click to toggle source
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 19
def upload(target, upload)
  super do |file|
    f = ::Alchemy::Attachment.create(
        file: file
    )
    root_path.build_file_path(f)
  end
end

Private Instance Methods

root_path() click to toggle source
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 44
def root_path
  Paths::Files.new(@root, '.', volume: self)
end