Class: Rack::SecureUpload::Scanner::Fsecure
- Defined in:
- lib/rack/secure_upload/scanner/fsecure.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Rack::SecureUpload::Scanner::Base
Instance Method Details
#scan(path) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rack/secure_upload/scanner/fsecure.rb', line 11 def scan(path) now_umask = ::File.umask(0) lock do output = command.run(path: path) logger.info output end ::File.exist?(path) ensure ::File.umask(now_umask) end |
#setup ⇒ Object
7 8 9 |
# File 'lib/rack/secure_upload/scanner/fsecure.rb', line 7 def setup raise SetupError, "#{[:bin_path]} is not found." unless ::File.exists?([:bin_path]) end |