<-- Previous || Up || Next -->

Is Path Relative Function
File Names Class

Public Function IsPathRelative( _
    ByVal vPath As Variant _
    ) As Variant

Determine if a path name is relative to the "current" directory on some drive or whether it is absolute.
Function returns True if the path name is relative and False if it is absolute.

Examples:
    IsPathRelative("C:\") = False
    IsPathRelative("C:Temp") = True
    IsPathRelative("C:\Temp") = False
    IsPathRelative("C:\Temp\..\VB.Tmp") = True ' #4
    IsPathRelative("Entisoft\Temp") = True
    IsPathRelative("\Entisoft\Temp") = True
    IsPathRelative("\\SJS4\Entisoft") = False
    IsPathRelative("\\SJS4\Entisoft\Temp") = False
    IsPathRelative("\\SJS4\Entisoft\..\Temp") = False ' #9
See also:
    MakePathAbsolute Function
vPath: The path name that is checked to see if it is relative or absolute. Function returns Null if vPath is Null or cannot be fixed-up to a string.
Definition: Absolute paths are those that specify a direct path to a file from the root of some named drive. All other path names are relative.
Note: Function also considers vPath relative if it contains substrings like "\.\" or "\..\".

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.