|PathGetFullPath Method (String)|
public static string GetFullPath( string path )
Public Shared Function GetFullPath ( path As String ) As String
public: static String^ GetFullPath( String^ path )
static member GetFullPath : path : string -> string
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.