Class: LogStash::Outputs::LogstashAzureBlobOutput::WritableDirectoryValidator
- Inherits:
-
Object
- Object
- LogStash::Outputs::LogstashAzureBlobOutput::WritableDirectoryValidator
- Defined in:
- lib/logstash/outputs/blob/writable_directory_validator.rb
Overview
a sub class of LogstashAzureBlobOutput
validates that the specified tmeporary directory can be accesed with write permission
Class Method Summary collapse
-
.valid?(path) ⇒ Boolean
Checks if a path is valid.
Class Method Details
.valid?(path) ⇒ Boolean
Checks if a path is valid
10 11 12 13 14 15 |
# File 'lib/logstash/outputs/blob/writable_directory_validator.rb', line 10 def self.valid?(path) FileUtils.mkdir_p(path) unless Dir.exist?(path) ::File.writable?(path) rescue false end |