- String path
path is an absolute path and
false if it is a
On POSIX systems, absolute paths start with a
/ (forward slash). On
Windows, an absolute path starts with
\\, or a drive letter followed by
:\. For URLs, absolute paths either start with a protocol and
optional hostname (e.g.
file://) or with a
URLs that start with
/ are known as "root-relative", since they're
relative to the root of the current URL. Since root-relative paths are still
absolute in every other sense, isAbsolute will return true for them. They
can be detected using isRootRelative.
bool isAbsolute(String path) => context.isAbsolute(path);