PathFormat Enumeration |
Namespace: Alphaleonis.Win32.Filesystem
Member name | Value | Description | |
---|---|---|---|
RelativePath | 0 | The format of the path is automatically detected by the method and internally converted to an extended length path.
It can be either a standard (short) full path, an extended length (unicode) full path or a relative path.
Example relative path: "Windows". | |
FullPath | 1 | The path is a full path in either normal or extended length (UNICODE) format.
Internally it will be converted to an extended length (UNICODE) path.
Using this option has a very slight performance advantage compared to using RelativePath.
Example full path: "C:\Windows" or "\\server\share". | |
LongFullPath | 2 | The path is an extended length path. No additional processing will be done on the path, and it will be used as is.
Using this option has a slight performance advantage compared to using RelativePath.
Example long full path: "\\?\C:\Windows" or "\\?\UNC\server\share". |
A path like: "C:\Windows" or "\\server\share" is considered a full path for a directory because it is rooted and has a drive/unc path. If the method supports it, FullPath and LongFullPath will skip GetFullPath() calls for path resolving of the object, while also avoiding path validation and checks. Using RelativePath (default) will always call GetFullPath() and perform path validation and checks.
When working in a loop with thousands of files, LongFullPath will give the best performance.