Method: Staticky::Files#mkdir_p

Defined in:
lib/staticky/files.rb

#mkdir_p(path) ⇒ Object

Creates a directory for the given path. It assumes that all the tokens, but the last, in ‘path` are meant to be a directory, whereas the last is meant to be a file. All the intermediate directories are created.

Examples:

require "staticky/files"

Staticky::Files.new.mkdir_p("path/to/file.rb")
  # => creates the `path/to` directory, but NOT `file.rb`

# WRONG it doesn't create the last directory, check `.mkdir`
Staticky::Files.new.mkdir_p("path/to/directory")
  # => creates the `path/to` directory

Raises:

See Also:

Since:

  • 0.1.0



185
186
187
# File 'lib/staticky/files.rb', line 185

def mkdir_p(path)
  adapter.mkdir_p(path)
end