Click or drag to resize
PathGetFullPath Method
Returns the absolute path for the specified path string.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static string GetFullPath(
	string path
)

Parameters

path
Type: SystemString
The file or directory for which to obtain absolute path information.

Return Value

Type: String
The fully qualified location of path, such as "C:\MyFile.txt".
Exceptions
ExceptionCondition
ArgumentExceptionpath is a zero-length string, contains only white space, or contains one or more of the invalid characters defined in GetInvalidPathChars.-or- The system could not retrieve the absolute path.
SecurityExceptionThe caller does not have the required permissions.
ArgumentNullExceptionpath is null.
NotSupportedExceptionpath contains a colon (":") that is not part of a volume identifier (for example, "c:\").
PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
See Also