This is an old revision of the document!

RemotePath.GetDirectoryName Method

Returns the directory information for the specified remote/*nix path string.

Syntax

C#
public static string GetDirectoryName(string path)
VB.NET
Public Shared Function GetDirectoryName(path As String) As String

Parameters

Name Description
string path Path to retrieve directory information from.

Return Value

Directory information for path, or null if path denotes a root directory or is null.

Exceptions

Exception Condition
ArgumentException path is empty.

Remarks

In most cases, the string returned by this method consists of all characters in the path up to but not including the last slash (/).

The method is an equivalent of the standard Path.GetDirectoryName method for remote/*nix paths.

Last modified: by martin