[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'LazFileUtils' (#lazutils)

AppendPathDelim

Adds a trailing path delimiter to the specified path (when needed).

Declaration

Source position: lazfileutils.pas line 94

function AppendPathDelim(

  const Path: string

):string;

Arguments

Path

  

Path value examined in the routine.

Function result

A path value which includes a trailing path delimiter.

Description

AppendPathDelim is a String function used to ensure that a trailing path delimiter is included in the specified Path. AppendPathDelim adds the platform-specific character in PathDelim to the end of Path if it is not an empty string, and does not already end with one of the values in AllowDirectorySeparators.

The return value contains the path with the added trailing path delimiter character, or the unmodified value in Path if a path delimiter was not added in the routine.

AppendPathDelim does not perform any type of resolution, expansion, or validation of the value passed in Path. Use routines like ExpandFileName(), DirectoryExists(), or FileExists() to perform these actions for a given path value. For UTF-8-enabled paths use ExpandFileNameUTF8(), FileExistsUTF8(), or DirectoryExistsUTF8().

Use ChompPathDelim to remove a trailing path delimiter from a specified path.

Windows

Please note that a value like 'C:' in Path results in 'C:\' in the return value. AppendPathDelim does not access the disk device to determine the per-device current directory; it simply appends the trailing path delimiter to the return value.

See also

ChompPathDelim

  

Removes a trailing path delimiter from the specified value.

DirectoryExistsUTF8

  

Determine if the specified path exists on the local file system.

ExpandFileNameUTF8

  

Expands the values in FileName and BaseDir to an absolute file name.

FileExistsUTF8

  

Indicates if the specified UTF-8-encoded file name exists.

DirectoryExists

ExpandFileName

ExtractFilePath

FileExists

PathDelim

DirectorySeparator

AllowDirectorySeparators


Version 4.0 Generated 2025-05-03 Home