TrimAndExpandFilename function
Cleans and resolves a file path to the specified base directory name.
Declaration
function TrimAndExpandFilename(const Filename: string;
const BaseDir: string='') : stringArguments
Filename | File name for the function. |
BaseDir | Base directory name used for a relative file path. |
Function result
Cleaned and resolved file path.
Description
TrimAndExpandFilename is a
String function used to
remove whitespace and special characters in Filename, and to resolve the
relative file path to the directory in BaseDir. TrimAndExpandFilename removes
a trailing path delimiter in Filename, and calls ExpandFileNameUTF8 and
TrimFilename to get the return value for the function.
The return value is an empty string ('') if Filename contains an empty string ('').
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
