mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 20:49:38 +02:00
23 lines
350 B
ObjectPascal
23 lines
350 B
ObjectPascal
Program Example49;
|
|
|
|
{ Program to demonstrate the Glob and GlobFree functions. }
|
|
|
|
Uses linux;
|
|
|
|
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.
|