Function: f-depth
f-depth is a byte-compiled function defined in f.el.
Signature
(f-depth PATH)
Documentation
Return the depth of PATH.
At first, PATH is expanded with f-expand. Then the full path is used to
detect the depth.
'/' will be zero depth, '/usr' will be one depth. And so on.
Source Code
;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f-depth (path)
"Return the depth of PATH.
At first, PATH is expanded with `f-expand'. Then the full path is used to
detect the depth.
'/' will be zero depth, '/usr' will be one depth. And so on."
(- (length (f-split (f-expand path))) 1))