module Rake::DSL

def directory(*args, &block) # :doc:

:doc:

directory "testdata/doc"
Example:

demand.
Declare a set of files tasks to create the given directories on
def directory(*args, &block) # :doc:
  args = args.flat_map { |arg| arg.is_a?(FileList) ? arg.to_a.flatten : arg }
  result = file_create(*args, &block)
  dir, _ = *Rake.application.resolve_args(args)
  dir = Rake.from_pathname(dir)
  Rake.each_dir_parent(dir) do |d|
    file_create d do |t|
      mkdir_p t.name unless File.exist?(t.name)
    end
  end
  result
end