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
Calls superclass method
Alchemy::Custom::Model::ElFinder::Volumes::AlchemyFile::new
# 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
Calls superclass method
Alchemy::Custom::Model::ElFinder::Volumes::AlchemyFile#decode
# 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
Calls superclass method
Alchemy::Custom::Model::ElFinder::Volumes::AlchemyFile#files
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 9 def files(target = '.') super(root_path) end
search(type:, q:)
click to toggle source
Calls superclass method
Alchemy::Custom::Model::ElFinder::Volumes::AlchemyFile#search
# File lib/alchemy/custom/model/el_finder/volumes/alchemy_files.rb, line 28 def search(type:, q:) super do search_query_build(klass: ::Alchemy::Attachment, type: type, q: q, mime_attribute: :file_mime_type) end end
upload(target, upload)
click to toggle source
Calls superclass method
Alchemy::Custom::Model::ElFinder::Volumes::AlchemyFile#upload
# 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