def create_dir(path, name, *options)
if default_creator.exists?(path + [ name ]) && !options.include?(:recursive)
raise DataAlreadyExistsError.new(path + [name])
end
begin
real_store.create_dir(path, name, *options)
rescue DataNotFoundError
if default_creator.exists?(path)
real_store.create_dir(path, name, :recursive, *options)
else
raise
end
end
options_hash = options.last.is_a?(Hash) ? options.last : {}
default_creator.created(path + [ name ], options_hash[:requestor], options.include?(:recursive))
end