Difference between revisions of "GetFiles"

From SCAR Divi Manual
Jump to: navigation, search
(Description)
(Availability)
Line 5: Line 5:
  
 
==Availability==
 
==Availability==
SCAR Divi 3.20 > Current
+
SCAR Divi 3.00 > Current
  
 
==Description==
 
==Description==

Revision as of 12:40, 1 July 2011

Definition

function GetFiles(Path, Ext: string): TStringArray;

Availability

SCAR Divi 3.00 > Current

Description

This function generates a list of all files in a given directory specified by Path with the file extension specified in Ext (without leading point) and returns it as a TStringArray. This function is not recursive and only returns the name (with extension) of the files. The Ext parameter does allow the usage of wildcards.

Example

var
  sa: TStringArray;
  i: Integer;

begin
  sa := GetFiles(IncludesPath, '*');
  for i := Low(sa) to High(sa) do
    WriteLn(sa[i]);
end.

See Also