Difference between revisions of "GetFolders"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function GetFolders(Path: string): TStringArray; </source> ==Availability== SCAR Divi 3.20 > Current ==Description== This func...")
 
(Description)
Line 8: Line 8:
  
 
==Description==
 
==Description==
This function generates a list of all subdirectories in a given directory specified by '''Path''' and returns it as a [[TStringArray]]. This function is not recursive.
+
This function generates a list of all subdirectories in a given directory specified by '''Path''' and returns it as a [[TStringArray]]. This function is not recursive and only returns the name of the folders without trailing path delimiter. The directory paths '.' and '..' are always amongst the results.
  
 
==Example==
 
==Example==

Revision as of 00:37, 29 June 2011

Definition

function GetFolders(Path: string): TStringArray;

Availability

SCAR Divi 3.20 > Current

Description

This function generates a list of all subdirectories in a given directory specified by Path and returns it as a TStringArray. This function is not recursive and only returns the name of the folders without trailing path delimiter. The directory paths '.' and '..' are always amongst the results.

Example

var
  sa: TStringArray;
  i: Integer;

begin
  sa := GetFolders(IncludesPath);
  for i := Low(sa) to High(sa) do
    WriteLn(sa[i]);
end.

See Also