is_absolute

Function is_absolute 

Source
pub fn is_absolute(path: &str) -> bool
Expand description

The method determines if path is an absolute path. If the given path is a zero-length string, false will be returned.

#Example

assert_eq!(nodejs_path::win32::is_absolute("//server"), true);
assert_eq!(nodejs_path::win32::is_absolute("\\\\server"), true);
assert_eq!(nodejs_path::win32::is_absolute("C:/foo/.."), true);
assert_eq!(nodejs_path::win32::is_absolute("C:\\foo\\.."), true);  
assert_eq!(nodejs_path::win32::is_absolute("bar\\baz"), false);  
assert_eq!(nodejs_path::win32::is_absolute("bar/baz"), false);  
assert_eq!(nodejs_path::win32::is_absolute("."), false);