lib/licensed/source/manifest.rb
def files_from_pattern_list(patterns)
        return Set.new if patterns.nil? || patterns.empty?

        # evaluate all patterns from the project root
        Dir.chdir @config.root do
          Array(patterns).reduce(Set.new) do |files, pattern|
            if pattern.start_with?("!")
              # if the pattern is an exclusion, remove all matching files
              # from the result
              files - Dir.glob(pattern[1..-1], File::FNM_DOTMATCH)
            else
              # if the pattern is an inclusion, add all matching files
              # to the result
              files + Dir.glob(pattern, File::FNM_DOTMATCH)
            end
          end
        end
      end
# Finds and returns all files in the project that match
# the glob pattern arguments.
Finds and returns all files in the project that match
the glob pattern arguments.
Finds and returns all files in the project that match the glob pattern arguments .
def files_from_pattern_list(patterns)
        return Set.new if patterns.nil? || patterns.empty?
        Dir.chdir @config.root do
          Array(patterns).reduce(Set.new) do |files, pattern|
            if pattern.start_with?("!")
              files - Dir.glob(pattern[1..-1], File::FNM_DOTMATCH)
            else
              files + Dir.glob(pattern, File::FNM_DOTMATCH)
            end
          end
        end
      end
def files_from_pattern_list ( patterns ) return Set . new if patterns . nil? || patterns . empty? Dir . chdir @config . root do Array ( patterns ) . reduce ( Set . new ) do | files , pattern | if pattern . start_with? ( "!" ) files - Dir . glob ( pattern [ 1 .. - 1 ] , File :: FNM_DOTMATCH ) else files + Dir . glob ( pattern , File :: FNM_DOTMATCH ) end end end end
Finds and returns all files in the project that match
the glob pattern arguments.
Finds and returns all files in the project that match the glob pattern arguments .
# evaluate all patterns from the project root # if the pattern is an exclusion, remove all matching files # from the result # if the pattern is an inclusion, add all matching files # to the result
patterns