Click or drag to resize

PathGetFileName Method

Returns the file name and extension of the specified path.

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public static string GetFileName(
	string path
)

Parameters

path  String
Path from which to get the file name from.

Return Value

String
String containing the file name with extension (ex. "test.txt"), null if the path is null, and Empty string if the path does not contain file name at the end. Note: This method is identical to the GetFileNameWithExtension method.
Exceptions
ExceptionCondition
ArgumentExceptionThe specified path contains invalid characters.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also