dirname


Description:

public string dirname (string path)

Extract the dirname from the file path.

Example:

    var path = new Path ("/tmp/file.txt");
assert (path.dirname ("/tmp/file.txt") == "/tmp");

Parameters:

path

file path to be checked.

Returns:

string of dirname. If path is empty, return "".