Sign in Join
FPDoc Onlineexperiment

TWindowsMaskUTF8.SplitFileNameExtension procedure

Member of TWindowsMaskUTF8protectedIn unit Masks

Separates the specified value into file name and extension values.

Declaration

pascal
class procedure SplitFileNameExtension(const aSourceFileName: string; 
 out aFileName: string; 
 out aExtension: string; 
 aIsMask: Boolean=False); static

Arguments

aSourceFileName

Value examined and separated into its component values.

aFileName

File name portion of the specified source file name.

aExtension

File extension portion of the specified source file name.

aIsMaskTrue if the source file name is treated as a mask specification for a file name and not a file extension; such as '.foo'.

Description

SplitFileNameExtension is a method used to separate the value in ASourceFileName into file name and file extension values.

The values are returned in the AFileName and AExtension arguments. AExtension can contain an empty string ('') if a file extension is not found in ASourceFileName.

AIsMask indicates whether the value in ASourceFileName is treated as a mask specification instead of a file name. When set to True, a value like '.foo' is treated as a mask where the file name is '.foo' instead of a file extension, like a hidden file name on UNIX-like file systems.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.