lib/cocoapods/sandbox/file_accessor.rb
# Matches the given patterns to the file present in the root of the path
# list.
#
# @param [Array<String, FileList>] patterns
#         The patterns to expand.
#
# @param  [String] dir_pattern
#         The pattern to add to directories.
#
# @param  [Array<String>] exclude_patterns
#         The exclude patterns to pass to the PathList.
#
# @raise  [Informative] If the pod does not exists.
#
# @return [Array<Pathname>] A list of the paths.
#
# @todo   Implement case insensitive search
#
Matches the given patterns to the file present in the root of the path
list.
Matches the given patterns to the file present in the root of the path list .
def expanded_paths(patterns, options = {})
        return [] if patterns.empty?
        file_lists = patterns.select { |p| p.is_a?(FileList) }
        glob_patterns = patterns - file_lists
        result = []
        result << path_list.glob(glob_patterns, options)
        result << file_lists.map do |file_list|
          file_list.prepend_patterns(path_list.root)
          file_list.glob
        end
        unless file_lists.empty?
        end
        result.flatten.compact.uniq
      end
def expanded_paths ( patterns , options = { } ) return [ ] if patterns . empty? file_lists = patterns . select { | p | p . is_a? ( FileList ) } glob_patterns = patterns - file_lists result = [ ] result << path_list . glob ( glob_patterns , options ) result << file_lists . map do | file_list | file_list . prepend_patterns ( path_list . root ) file_list . glob end unless file_lists . empty? end result . flatten . compact . uniq end
Matches the given patterns to the file present in the root of the path
list.
Matches the given patterns to the file present in the root of the path list .
# TODO Restore warning in 0.17 proper # UI.warn "[#{spec_consumer.spec.name}] The usage of Rake FileList is deprecated. Use `exclude_files`."
A list of the paths.
A list of the paths .
Array<Pathname>
[Informative] If the pod does not exists.
[ Informative ] If the pod does not exists .
patterns
options
exclude_patterns The exclude patterns to pass to the PathList.
exclude_patterns The exclude patterns to pass to the PathList .
todo
Implement case insensitive search
Implement case insensitive search