|
FilePathGetDirectoryName Method
|
Gets the directory information from the specified file path.
Namespace: GSF.IOAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.253-beta+ffb7163c9e3b771705bc5b9aa3f09870f2cb9e2c
Syntaxpublic static string GetDirectoryName(
string filePath
)
Public Shared Function GetDirectoryName (
filePath As String
) As String
public:
static String^ GetDirectoryName(
String^ filePath
)
static member GetDirectoryName :
filePath : string -> string
GSF.IO.FilePath.GetDirectoryName = function(filePath);
View SourceParameters
- filePath String
- The file path from which the directory information is to be obtained.
Return Value
StringDirectory information.
Remarks
This differs from GetDirectoryName(String) in that it will see if last name in path is
a directory and, if it exists, will properly treat that part of path as a directory. The .NET path
function always assumes last entry is a file name if path is not suffixed with a slash. For example:
Path.GetDirectoryName(@"C:\Music") will return "C:\", however,
FilePath.GetDirectoryName(@"C:\Music") will return "C:\Music\", so long as Music directory exists.
See Also