Skip to content

IncludeTrailingPathDelimiter

Add trailing directory separator to a pathname, if needed.

Declaration

Source position: finah.inc line 36

function IncludeTrailingPathDelimiter(const Path: UnicodeString)
                                      : UnicodeString;
function IncludeTrailingPathDelimiter(const Path: RawByteString)
                                      : RawByteString;

Description

IncludeTrailingPathDelimiter adds a trailing path delimiter character (PathDelim) to Path if none is present yet, and returns the result.

If Path is empty, a path delimiter is returned, for Delphi compatibility.

See also

Name Description
IncludeTrailingBackslash Add trailing directory separator to a pathname, if needed.
ExcludeTrailingPathDelimiter Strip trailing directory separator from a pathname, if needed.
PathDelim Path (directory) delimiter.
IsPathDelimiter Is the character at the given position a pathdelimiter ?