Class: LogStash::Setting::ExistingFilePath
- Inherits:
-
LogStash::Setting
- Object
- LogStash::Setting
- LogStash::Setting::ExistingFilePath
- Defined in:
- lib/logstash/settings.rb
Instance Attribute Summary
Attributes inherited from LogStash::Setting
Instance Method Summary collapse
-
#initialize(name, default = nil, strict = true) ⇒ ExistingFilePath
constructor
A new instance of ExistingFilePath.
Methods inherited from LogStash::Setting
#==, #reset, #set, #set?, #strict?, #to_hash, #validate_value, #value
Methods included from Util::Loggable
included, #logger, #slow_logger
Constructor Details
#initialize(name, default = nil, strict = true) ⇒ ExistingFilePath
Returns a new instance of ExistingFilePath.
399 400 401 402 403 404 405 406 407 |
# File 'lib/logstash/settings.rb', line 399 def initialize(name, default=nil, strict=true) super(name, ::String, default, strict) do |file_path| if !::File.exists?(file_path) raise ::ArgumentError.new("File \"#{file_path}\" must exist but was not found.") else true end end end |