Class: ElFinder2::File
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ElFinder2::File
show all
- Includes:
- HashUtils
- Defined in:
- app/models/el_finder2/file.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from HashUtils
#from_base64url, #to_base64url, #to_path
Class Method Details
.find_by_path(path) ⇒ Object
8
9
10
|
# File 'app/models/el_finder2/file.rb', line 8
def self.find_by_path(path)
super(path.split('/'))
end
|
.path_exists?(path) ⇒ Boolean
12
13
14
|
# File 'app/models/el_finder2/file.rb', line 12
def self.path_exists?(path)
!!find_by_path(path.split('/'))
end
|
.upload_attributes(_) ⇒ Object
16
17
18
|
# File 'app/models/el_finder2/file.rb', line 16
def self.upload_attributes(_)
{}
end
|
Instance Method Details
#path ⇒ Object
20
21
22
|
# File 'app/models/el_finder2/file.rb', line 20
def path
ancestry_path.join('/')
end
|
#path_hash ⇒ Object
24
25
26
|
# File 'app/models/el_finder2/file.rb', line 24
def path_hash
"#{ElFinder2::VOLUME_ID}_#{to_base64url(path)}"
end
|