Function: f-ancestor-of-p
f-ancestor-of-p is a byte-compiled function defined in f.el.
Signature
(f-ancestor-of-p PATH-A PATH-B)
Documentation
Return t if PATH-A is ancestor of PATH-B.
Other relevant functions are documented in the f group.
Shortdoc
;; f
(f-ancestor-of-p "/path/to" "/path/to/dir")
=> t
(f-ancestor-of-p "/path" "/path/to/dir")
=> t
(f-ancestor-of-p "/path/to/dir" "/path/to")
=> nil
(f-ancestor-of-p "/path/to" "/path/to")
=> nil
Aliases
Source Code
;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f-ancestor-of-p (path-a path-b)
"Return t if PATH-A is ancestor of PATH-B."
(unless (f-same-p path-a path-b)
(string-prefix-p (f-full path-a)
(f-full path-b))))