If the paths provided are valid

 @return [Boolean] True if the paths exist.
432616
def valid_paths?
      paths = options[:cookbook_paths] + options[:role_paths] +
        options[:environment_paths]
      paths.any? && paths.all? { |path| File.exist?(path) }
    end
234098
def paths=(raw_paths)
    raw_paths = [raw_paths] unless raw_paths.respond_to? :each

    @paths = raw_paths.map { |path| Pathname.new(path) }
  end
1008536
def valid?
    @errors = (defined?(HashWithIndifferentAccess) ? HashWithIndifferentAccess : ActiveSupport::HashWithIndifferentAccess).new
    
    self.class._module.required_fields.each do |attribute|
      valid_attribute?(attribute)
    end
    
    # for rails compatibility
    def @errors.full_messages
      # After removing attributes without errors, flatten the error hash, repeating the name of the attribute before each message:
      # e.g. {'name' => ['cannot be blank', 'is too long'], 'website' => ['is not valid']}
      # will become 'name cannot be blank, name is too long, website is not valid
      self.inject([]){|memo, obj| memo.concat(obj[1].inject([]){|m, o| m << "#{obj[0].to_s.humanize} #{o}" })}
    end
    
    # Rails needs each attribute to be present in the error hash (if the attribute has no error, it has [] as a value)
    # Redefine the [] method for the errors hash to return [] instead of nil is the hash doesn't contain the key
    class << @errors
      alias :old_key_lookup :[]
      def [](key)
        old_key_lookup(key) || Array.new
      end
    end
    
    @errors.size == 0
  end
1197590
def is_valid_path(path):
    
    if not path.startswith('/'):
        msg = 'Invalid path "%s". Paths need to start with "/".'
        raise ValueError(msg % path[:40])

    for c in ' \t':
        if c in path:
            msg = ('Invalid character "%s" found in path. Paths need to be'
                   ' URL-encoded.')
            raise ValueError(msg % c)

    return True
818743
def format_paths(paths, filepath)
      # Extract included paths
      paths
        .map { |path| File.join(File.dirname(filepath), path) }
        .map { |path| File.expand_path(path) }
        .select { |path| File.exist?(path) || Dir.exist?(path) }
    end
311785
def path_valid(self):
        
        valid = [i is not None for i in self.polygons_closed]
        valid = np.array(valid, dtype=np.bool)
        return valid
466078
def exists?(filename)
      if File.exists?(@path)
        File.exists?(path_to(filename))
      else
        Zip::ZipFile::foreach(@package) do |entry|
          return true if entry.name == filename
        end
        false
      end
    end
252956
def _CheckIfPathIsValidForDeletion(path, prefix=None, directories=None):
  """"""
  precondition.AssertType(path, Text)
  precondition.AssertType(prefix, Text)

  if prefix and os.path.basename(path).startswith(prefix):
    return True

  path = path.lower()
  for directory in directories or []:
    directory = directory.lower()
    if os.path.commonprefix([directory, path]) == directory:
      return True
  return False
410420
public boolean hasErrors() {
        if (!errors.isEmpty())
            return true;

        for (PathWrapper ar : pathWrappers) {
            if (ar.hasErrors())
                return true;
        }

        return false;
    }
445159
def file_exists?(paths, file)
      paths.any? do |path|
        Find.find(path)
            .map { |path_file| Shellwords.escape(path_file) }
            .include?(file)
      end
    end
913393
def valid?
      return false if !@name.nil? && @name.to_s.length > 500
      return false if @quantity.nil?
      return false if @quantity.to_s.length > 5
      return false if @quantity.to_s.length < 1
      return false if !@note.nil? && @note.to_s.length > 500
      return false if !@catalog_object_id.nil? && @catalog_object_id.to_s.length > 192
      return false if !@variation_name.nil? && @variation_name.to_s.length > 255
      return true
    end
1140672
def valid?
      return false if @first_page.nil?
      return false if @last_page.nil?
      return false if @odd_pages.nil?
      return false if @even_pages.nil?
      return true
    end
1283942
def ignore_path?(action, options)
        options[:except].present? &&  options[:except].include?(action) and return true
        options[:only].present?   && !options[:only].include?(action)   and return true
        false
      end
642207
def assert_valid_keys(hash, *valid_keys)
      unknown_keys = hash.keys - [valid_keys].flatten
      raise(ArgumentError, "Unsupported option(s) detected: #{unknown_keys.join(", ")}") unless unknown_keys.empty?
    end
761482
def paths
      relative_paths = gem_names.flat_map do |plugin|
        Dir.glob("vendor/gems/ruby/*/gems/#{plugin}*/lib/**/**/**/**.rb")
      end

      relative_paths.map { |path| File.join(dir, path) }
    end
369380
def validate_no_duplicate_paths(self, resources):
        
        paths = set()
        for item in resources:
            file_name = item.get('path')
            if file_name in paths:
                raise ValueError(
                    '%s path was specified more than once in the metadata' %
                    file_name)
            paths.add(file_name)
1100431
def ignored?(path)
      @@conf.ignore.each do |ignore|
        return true if rel_path(path).match(ignore)
      end
      return false
    end