bootloader/RAK4630/old/Adafruit_nRF52_Bootloader/lib/tinyusb/test/vendor/ceedling/lib/ceedling/configurator_validator.rb
# walk into config hash. verify directory path(s) at given key depth
walk into config hash. verify directory path(s) at given key depth
walk into config hash . verify directory path ( s ) at given key depth
def validate_path_list(config, *keys)
    hash = retrieve_value(config, keys)
    list = hash[:value]
    return false if (list.nil?)
    path_list = []
    exist = true
    case list
      when String then path_list << list
      when Array  then path_list =  list
    end
    path_list.each do |path|
      base_path = FilePathUtils::extract_path(path) 
      if (not @file_wrapper.exist?(base_path))
        @stream_wrapper.stderr_puts("ERROR: Config path #{format_key_sequence(keys, hash[:depth])}['#{base_path}'] does not exist on disk.") 
        exist = false
      end 
    end
    return exist
  end
def validate_path_list ( config , * keys ) hash = retrieve_value ( config , keys ) list = hash [ :value ] return false if ( list . nil? ) path_list = [ ] exist = true case list when String then path_list << list when Array then path_list = list end path_list . each do | path | base_path = FilePathUtils :: extract_path ( path ) if ( not @file_wrapper . exist? ( base_path ) ) @stream_wrapper . stderr_puts ( "ERROR: Config path #{format_key_sequence(keys, hash[:depth])}['#{base_path}'] does not exist on disk." ) exist = false end end return exist end
walk into config hash.
walk into config hash .
# return early if we couldn't walk into hash and find a value # lop off add/subtract notation & glob specifiers # no verbosity checking since this is lowest level anyhow & verbosity checking depends on configurator
config
keys