suve

awful: function: file-extract-path

Available since rev.36 (v.0.5.0).

Declaration

string :file-extract-path ( string $FILEPATH )

Summary

For given file path, extracts the directory. Returned value contains the final directory separator (ends with / or \) and, on Windows, the drive letter (if provided). String type (ASCII/UTF-8) matches the argument type.

Example

# :file-extract-* example
:writeln s'Full path: ' =FILE-PATH
:writeln s'Extension: ' :file-extract-ext  =FILE-PATH
:writeln s'Filename:  ' :file-extract-name =FILE-PATH
:writeln s'Path:      ' :file-extract-path =FILE-PATH

wikistrona zmodyfikowana 2014/0601/2317