Ryan C. Thompson
Ryan C. Thompson

Reputation: 42080

How do I test whether a path is absolute in Elisp?

I'm doing some path manipulation in Emacs Lisp, and I want to know how to test whether a string represents an absolute path. What is the canonical way to do this? Note that I don't want to check whether the path actually exists on the file system, I just want to check if a string represents an absolute path or not.

Upvotes: 2

Views: 204

Answers (1)

Ryan C. Thompson
Ryan C. Thompson

Reputation: 42080

I just found the answer: file-name-absolute-p.

Upvotes: 5

Related Questions