Class: LogStash::Outputs::S3::WritableDirectoryValidator
- Inherits:
-
Object
- Object
- LogStash::Outputs::S3::WritableDirectoryValidator
- Defined in:
- lib/logstash/outputs/s3/writable_directory_validator.rb
Class Method Summary collapse
Class Method Details
.valid?(path) ⇒ Boolean
6 7 8 9 10 11 12 13 |
# File 'lib/logstash/outputs/s3/writable_directory_validator.rb', line 6 def self.valid?(path) begin FileUtils.mkdir_p(path) unless Dir.exist?(path) ::File.writable?(path) rescue false end end |