GetDirectoryFromPath (open)

Obtain the directory part from a path

Syntax

LOADLIB "wh::files.whlib";

STRING FUNCTION GetDirectoryFromPath(STRING path)

Parameters

STRING path

Path to strip

Return value

STRING

The directory from the submitted path

Description

Strips the filename and extension from a complete path, leaving only the directory name. This is only done for the path submitted to the function. No checks on disk or in the WebHare database are performed

Examples

//Returns "/my/dir/"
PRINT(GetDirectoryFromPath("/my/dir/b-lex.it");