module Sprockets::PathUtils
def entries(path)
path - String directory path
swap files.
Public: A version of `Dir.entries` that filters out `.` files and `~`
def entries(path) if File.directory?(path) entries = Dir.entries(path, :encoding => Encoding.default_internal) entries.reject! { |entry| entry.start_with?(".".freeze) || (entry.start_with?("#".freeze) && entry.end_with?("#".freeze)) || entry.end_with?("~".freeze) } entries.sort! else [] end end