public static class QuickIOPath
Performs operations for files or directories and path information.
DirectorySeparatorChar
Directory Separator Char
public Char DirectorySeparatorChar
MaxRegularPathLength
Maximum allowed length of a regular path
public const Int32 MaxRegularPathLength
Constant Value
MaxSimpleDirectoryPathLength
Maximum allowed length of a regular folder path
public const Int32 MaxSimpleDirectoryPathLength
Constant Value
MaxUncPathLength
Maximum allowed length of an UNC Path
public const Int32 MaxUncPathLength
Constant Value
RegularLocalPathPrefix
Regular local path prefix
public const String RegularLocalPathPrefix
UncLocalPathPrefix
UNC prefix for regular paths
public const String UncLocalPathPrefix
Constant Value
UncLocalPathPrefixLength
Length of UNC prefix for regular paths
public readonly Int32 UncLocalPathPrefixLength
Combine(String[] pathElements)
Combines given path elements
public static String Combine(String[] pathElements)
Parameters
pathElements
String[]Path elements to combine
Returns
Combined Path
Exists(String path)
Checks if path exists
public static Boolean Exists(String path)
Parameters
path
StringPath to check
Returns
True on exists
GetFullPath(String path)
A wrapper for GetFullPath
public static String GetFullPath(String path)
GetFullPathInfo(String path)
A wrapper for GetFullPath that returns QuickIOPathInfo
public static QuickIOPathInfo GetFullPathInfo(String path)
GetName(String fullName)
Gets name of file or directory
public static String GetName(String fullName)
Parameters
fullName
StringPath
Returns
Name of file or directory
Exceptions
InvalidPathException
Path is invalid
GetParentPath(String fullName)
Returns the parent directory path
public static String GetParentPath(String fullName)
Parameters
fullName
StringPath to get the parent from
Returns
Parent directory
GetRandomDirectoryName()
Returns GetRandomFileName without extension
public static String GetRandomDirectoryName()
Returns
GetRandomFileName without extension
GetRandomFileName()
Returns GetRandomFileName
public static String GetRandomFileName()
Returns
GetRandomFileName
GetRoot(String fullName)
Returns the root directory path
public static String GetRoot(String fullName)
Parameters
fullName
StringPath to get the parent from
Returns
Root directory
GetRootFromLocalPath(String path, QuickIOPathLocation location)
Returns root from path by given location type
public static String GetRootFromLocalPath(String path, QuickIOPathLocation location)
IsLocalRegularPath(String path)
Returns true if path is local regular path such as 'C:\folder\folder\file.txt'
public static Boolean IsLocalRegularPath(String path)
Parameters
path
StringPath
Returns
True if path is local regular path
IsLocalUncPath(String path)
Returns true if path is local UNC path such as '\?\C:\folder\folder\file.txt'
public static Boolean IsLocalUncPath(String path)
Parameters
path
StringPath
Returns
True if path is local UNC path
public static QuickIOParsePathResult ParsePath(String path, Boolean supportRelativePath)
ThrowIfPathContainsInvalidChars(String path)
Invalid Chars are: " < > | and all chars lower than ASCII value 32
public static void ThrowIfPathContainsInvalidChars(String path)
Parameters
path
StringPath to check
Exceptions
InvalidPathException
If invalid character found
Remarks
Ignores Unix File Systems
ToLocalRegularPath(String uncLocalPath)
Converts an unc path to a local regular path
public static String ToLocalRegularPath(String uncLocalPath)
Parameters
uncLocalPath
StringUnc Path
Returns
Local Regular Path
Example
\?\C:\temp\file.txt >> C:\temp\file.txt
ToLocalUncPath(String regularLocalPath)
Converts a regular local path to an unc path
public static String ToLocalUncPath(String regularLocalPath)
Parameters
regularLocalPath
StringRegular Path
Returns
Local Unc Path
Example
C:\temp\file.txt >> \?\C:\temp\file.txt
ToRegularPath(String anyFullname)
Converts unc path to regular path
public static String ToRegularPath(String anyFullname)
ToUncPath(String anyFullname)
Converts regular path to unc path
public static String ToUncPath(String anyFullname)
TrimTrailingSepartor(String path)
Removes Last
private static String TrimTrailingSepartor(String path)
TryParseLocalRegularPath(String path, QuickIOParsePathResult& parsePathResult)
Returns true if specified path is local regular path and returns result due to parsePathResult
public static Boolean TryParseLocalRegularPath(String path, QuickIOParsePathResult& parsePathResult)
Parameters
path
StringLocal path to parse
parsePathResult
QuickIOParsePathResult&QuickIOParsePathResult
Returns
True if parse succeeded and parsePathResult is filled
TryParseLocalUncPath(String path, QuickIOParsePathResult& parsePathResult)
Returns true if specified path is local UNC path and returns result due to parsePathResult
public static Boolean TryParseLocalUncPath(String path, QuickIOParsePathResult& parsePathResult)
Parameters
path
StringLocal UNC path to parse
parsePathResult
QuickIOParsePathResult&QuickIOParsePathResult
Returns
True if parse succeeded and parsePathResult is filled
TryParsePath(String path, QuickIOParsePathResult& parsePathResult, Boolean supportRelativePath)
Try to parse path
public static Boolean TryParsePath(String path, QuickIOParsePathResult& parsePathResult, Boolean supportRelativePath)
Parameters
path
StringPath to parse
parsePathResult
QuickIOParsePathResult&Result. See QuickIOParsePathResult
supportRelativePath
Booleantrue to support relative path
Returns
True on success. parsePathResult is set.