path.isAbsolute(path)
Determines whether path is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
Posix examples:
path.isAbsolute('/foo/bar') // true
path.isAbsolute('/baz/..') // true
path.isAbsolute('qux/') // false
path.isAbsolute('.') // falseWindows examples:
path.isAbsolute('//server') // true
path.isAbsolute('C:/foo/..') // true
path.isAbsolute('bar\\baz') // false
path.isAbsolute('.') // falseNote: If the path string passed as parameter is a zero-length string, unlike other path module functions, it will be used as-is and false will be returned.
Please login to continue.