[Overview][Constants][Types][Procedures and functions][Variables][Index] |
Find filenames matching a wildcard pattern
Source position: oldlinux.pp line 1586
function Glob( |
const path: PathStr |
):pglob; |
Glob returns a pointer to a glob structure which contains all filenames which exist and match the pattern in Path. The pattern can contain wildcard characters, which have their usual meaning.
Returns nil on error, and LinuxError is set.
|
Free result of Glob call |
Program Example49; { Program to demonstrate the Glob and GlobFree functions. } Uses oldlinux; Var G1,G2 : PGlob; begin G1:=Glob ('*'); if LinuxError=0 then begin G2:=G1; Writeln ('Files in this directory : '); While g2<>Nil do begin Writeln (g2^.name); g2:=g2^.next; end; GlobFree (g1); end; end.
lazarus-ccr.sourceforge.net |