PowerTCP SSH and SFTP for .NET
GetDirectoryName Method




The Unix path of a file or directory.
Returns the directory information for the specified Unix path string.
Syntax
'Declaration
 
Public Shared Function GetDirectoryName( _
   ByVal unixPath As String _
) As String
'Usage
 
Dim unixPath As String
Dim value As String
 
value = UnixPath.GetDirectoryName(unixPath)
public static string GetDirectoryName( 
   string unixPath
)
public: static string* GetDirectoryName( 
   string* unixPath
) 
public:
static String^ GetDirectoryName( 
   String^ unixPath
) 

Parameters

unixPath
The Unix path of a file or directory.

Return Value

Directory information for unixPath, or null if unixPath denotes a root directory or is null. Returns String.Empty if unixPath does not contain directory information.
Exceptions
ExceptionDescription
System.ArgumentExceptionunixPath contains Unix filesystem-illegal characters (NUL), is empty, or contains only white spaces.
Remarks
In most cases, the string returned by this method consists of all characters in the path up to but not including the last UnixDirectorySeparatorChar. If the path consists of a root ("/"), null is returned.
See Also

Reference

UnixPath Class
UnixPath Members


PowerTCP SSH and SFTP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic