GetFiles

From SCAR Divi Manual
Revision as of 02:39, 2 February 2013 by Freddy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function GetFiles(const Path, Ext: string): TStrArray;

Availability

SCAR Divi 3.00 > Current

Notes

  • Did not work 100% correctly until 3.39

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 TStrArray. 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: TStrArray;
  i: Integer;

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

See Also