Method Path2.IsFullPath
Overload
Returns true if the string is full path, like @"C:\a\b.txt" or @"C:" or @"\\server\share\...":
public static bool IsFullPath(ReadOnlySpan<char> path, bool orEnvVar = false)
Parameters
|
path (ReadOnlySpan<char>)
Any string. Can be |
|
orEnvVar (bool)
Also return |
Returns
Remarks
Returns true if path matches one of these wildcard patterns (with '\\' or '/'):
@"?:\*"- local path, like@"C:\a\b.txt". Here?is A-Z, a-z.@"?:"- drive name, like@"C:". Here?is A-Z, a-z.@"\\*"- network path, like@"\\server\share\...". Or has prefix@"\\?\".
Supports only filesystem paths. Returns false if path is URL (Path2.IsUri) or starts with "::".