vendor/gems/chriseppstein-compass-0.8.10/lib/compass/actions.rb
# create a directory and all the directories necessary to reach it.
create a directory and all the directories necessary to reach it.
create a directory and all the directories necessary to reach it .
def directory(dir, options = nil)
      options ||= self.options if self.respond_to?(:options)
      if File.exists?(dir) && File.directory?(dir)
          logger.record :exists, basename(dir) unless options[:quiet]
      elsif File.exists?(dir)
        msg = "#{basename(dir)} already exists and is not a directory."
        raise Compass::FilesystemConflict.new(msg)
      else
        logger.record :directory, separate("#{basename(dir)}/")
        FileUtils.mkdir_p(dir) unless options[:dry_run]
      end
    end
def directory ( dir , options = nil ) options ||= self . options if self . respond_to? ( :options ) if File . exists? ( dir ) && File . directory? ( dir ) logger . record :exists , basename ( dir ) unless options [ :quiet ] elsif File . exists? ( dir ) msg = "#{basename(dir)} already exists and is not a directory." raise Compass :: FilesystemConflict . new ( msg ) else logger . record :directory , separate ( "#{basename(dir)}/" ) FileUtils . mkdir_p ( dir ) unless options [ :dry_run ] end end
create a directory and all the directories necessary to reach it.
create a directory and all the directories necessary to reach it .
dir
options