GetFiles

From SCAR Divi Manual
Revision as of 13:38, 1 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function GetFiles(Path, Ext: string): TStringArray; </source> ==Availability== SCAR Divi 3.20 > Current ==Description== This f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

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

Availability

SCAR Divi 3.20 > Current

Description

This function generates a list of all filesin 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.

Example

var
  sa: TStringArray;
  i: Integer;

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

See Also