| isAbsolutePath {ramwas} | R Documentation |
Check whether a path is relative or absolute.
isAbsolutePath(path)
path |
Path to be tested. |
The function is designed to word with both Windows and Unix paths.
TRUE if the path is absolute, FALSE otherwise.
This function improves upon the analog function
in R.utils package.
For instance, "~hi" is not an absolute path.
Andrey A Shabalin andrey.shabalin@gmail.com
See also makefullpath.
isAbsolutePath( "C:/123" ) # TRUE isAbsolutePath( "~123" ) # FALSE isAbsolutePath( "~/123" ) # TRUE isAbsolutePath( "/123" ) # TRUE isAbsolutePath( "\\123" ) # TRUE isAbsolutePath( "asd\\123" ) # FALSE isAbsolutePath( "a\\123" ) # FALSE