Class: FTPMVC::Filter::FilesystemAccess
- Inherits:
-
Base
- Object
- Base
- FTPMVC::Filter::FilesystemAccess
show all
- Defined in:
- lib/ftpmvc/filter/filesystem_access.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#directory?(path) ⇒ Boolean
16
17
18
|
# File 'lib/ftpmvc/filter/filesystem_access.rb', line 16
def directory?(path)
@fs.resolve(path).kind_of?(Directory)
end
|
#exists?(path) ⇒ Boolean
20
21
22
|
# File 'lib/ftpmvc/filter/filesystem_access.rb', line 20
def exists?(path)
not @fs.resolve(path).nil?
end
|
#get(path) ⇒ Object
8
9
10
|
# File 'lib/ftpmvc/filter/filesystem_access.rb', line 8
def get(path)
@fs.resolve(::File.dirname(path)).get(::File.basename(path))
end
|
#index(path) ⇒ Object
12
13
14
|
# File 'lib/ftpmvc/filter/filesystem_access.rb', line 12
def index(path)
@fs.resolve(path).index
end
|
#put(path, input) ⇒ Object
24
25
26
|
# File 'lib/ftpmvc/filter/filesystem_access.rb', line 24
def put(path, input)
@fs.resolve(::File.dirname(path)).put(::File.basename(path), input)
end
|