Click or drag to resize

PathGetFullPath Method (String, GetFullPathOptions)

Returns the absolute path for the specified path string.

Namespace:  Alphaleonis.Win32.Filesystem
Assembly:  AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax
public static string GetFullPath(
	string path,
	GetFullPathOptions options
)

Parameters

path
Type: SystemString
The file or directory for which to obtain absolute path information.
options
Type: Alphaleonis.Win32.FilesystemGetFullPathOptions
Options for controlling the full path retrieval.

Return Value

Type: String
The fully qualified location of path, such as "C:\MyFile.txt".
Exceptions
Remarks

GetFullPathName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.

It also calculates the address of the file name portion of the full path and file name.

 

This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.

The .NET Framework does not support direct access to physical disks through paths that are device names, such as "\\.\PHYSICALDRIVE0".

 

MSDN: Multithreaded applications and shared library code should not use the GetFullPathName function and

should avoid using relative path names. The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,

therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.

This limitation also applies to the SetCurrentDirectory and GetCurrentDirectory functions. The exception being when the application is guaranteed to be running in a single thread,

for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.

Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.

See Also