Function: f-mkdir

f-mkdir is a byte-compiled function defined in f.el.

Signature

(f-mkdir &rest DIRS)

Documentation

Create directories DIRS.

DIRS should be a successive list of directories forming together a full path. The easiest way to call this function with a fully formed path is using f-split alongside it:

    (apply #'f-mkdir (f-split "path/to/file"))

Although it works sometimes, it is not recommended to use fully formed paths in the function. In this case, it is recommended to use f-mkdir-full-path instead.

Source Code

;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
;;;; Destructive

(defun f-mkdir (&rest dirs)
  "Create directories DIRS.

DIRS should be a successive list of directories forming together
a full path.  The easiest way to call this function with a fully
formed path is using `f-split' alongside it:

    (apply #\\='f-mkdir (f-split \"path/to/file\"))

Although it works sometimes, it is not recommended to use fully
formed paths in the function. In this case, it is recommended to
use `f-mkdir-full-path' instead."
  (let (path)
    (-each
        dirs
      (lambda (dir)
        (setq path (f-expand dir path))
        (unless (f-directory-p path)
          (f--destructive path (make-directory path)))))))