Method: Hanami::Utils::Files.mkdir

Defined in:
lib/hanami/utils/files.rb

.mkdir(path) ⇒ Object

Creates a directory for the given path. It assumes that all the tokens in path are meant to be a directory. All the intermediate directories are created.

Examples:

require "hanami/utils/files"

Hanami::Utils::Files.mkdir("path/to/directory")
  # => creates the `path/to/directory` directory

# WRONG this isn't probably what you want, check `.mkdir_p`
Hanami::Utils::Files.mkdir("path/to/file.rb")
  # => creates the `path/to/file.rb` directory

See Also:

Since:

  • 1.1.0



70
71
72
# File 'lib/hanami/utils/files.rb', line 70

def self.mkdir(path)
  FileUtils.mkdir_p(path)
end