Function: f-touch

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

Signature

(f-touch PATH)

Documentation

Update PATH last modification date or create if it does not exist.

Other relevant functions are documented in the f group.

Shortdoc

;; f
(f-touch "path/to/existing/file.txt")
    -> [it depends]
  (f-touch "path/to/non/existing/file.txt")
    -> [it depends]

Source Code

;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f-touch (path)
  "Update PATH last modification date or create if it does not exist."
  (f--destructive path
    (if (f-file-p path)
        (set-file-times path)
      (f-write-bytes "" path))))