Click or drag to resize
PathFormat Enumeration
Indicates the format of a path passed to a method.

Namespace: Alphaleonis.Win32.Filesystem
Assembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax
public enum PathFormat
Members
  Member nameValueDescription
RelativePath0The 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".

FullPath1The 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".

LongFullPath2The 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".

Remarks
At some point in code you know the full path of file system objects, e.g.: "C:\Windows". For example, Directory.EnumerateFileSystemEntries() will return all files and directories from a given path. Most likely, some processing will happen on the results of the enum. The file or directory may be passed on to another function. Whenever a file path is required, some performance can be gained.

 

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.
See Also