module Sprockets::Paths

def append_path(path)

Paths at the beginning of the `Array` have a higher priority.

Append a `path` to the `paths` list.
def append_path(path)
  self.config = hash_reassoc(config, :paths) do |paths|
    path = File.expand_path(path, config[:root]).freeze
    paths.push(path)
  end
end

def clear_paths

you want.
completely wipe the paths list and reappend them in the order
There is no mechanism for reordering paths, so its best to

Clear all paths and start fresh.
def clear_paths
  self.config = hash_reassoc(config, :paths) do |paths|
    paths.clear
  end
end

def each_file

Returns Enumerator if no block is given.

Public: Iterate over every file under all load paths.
def each_file
  return to_enum(__method__) unless block_given?
  paths.each do |root|
    stat_tree(root).each do |filename, stat|
      if stat.file?
        yield filename
      end
    end
  end
  nil
end

def paths

These paths will be used for asset logical path lookups.

Returns an `Array` of path `String`s.
def paths
  config[:paths]
end

def prepend_path(path)

Paths at the end of the `Array` have the least priority.

Prepend a `path` to the `paths` list.
def prepend_path(path)
  self.config = hash_reassoc(config, :paths) do |paths|
    path = File.expand_path(path, config[:root]).freeze
    paths.unshift(path)
  end
end

def root

useful set this to your applications root directory. (`Rails.root`)
All relative paths are expanded with root as its base. To be

Returns `Environment` root.
def root
  config[:root]
end

def root=(path)

Only the initializer should change the root.

Internal: Change Environment root.
def root=(path)
  self.config = hash_reassoc(config, :root) do
    File.expand_path(path)
  end
end