#!/usr/bin/env instantfpc

{ List all .pas files in this directory, recursively.

  To make this work,
  - install FPC, which should include the instantfpc binary
  - install CGE using FpMake/FpPkg following https://castle-engine.io/fpmake
}

uses CastleFindFiles;

procedure FileCallback(const FileInfo: TFileInfo; Data: Pointer; var StopSearch: boolean);
begin
  Writeln(FileInfo.URL);
end;

begin
  FindFiles('*.pas', false, @FileCallback, nil, [ffRecursive]);
end.
