[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'amigados' (#aros)


Structure expected by MatchFirst, MatchNext to find Files.


Source position: amigados.pas line 426

type TAnchorPath = record

  case SmallInt of

    0: (

        ap_First: PAChain;


Pointer to first anchor

        ap_Last: PAChain;


Pointer to last anchor


    1: (

        ap_Base: PAChain;


        ap_Current: PAChain;


        ap_BreakBits: LongInt;


Bits we want to break on (DDF_*)

        ap_FoundBreak: LongInt;


Bits we broke on. Also returns ERROR_BREAK

        ap_Flags: ShortInt;


Extra flags

        ap_Reserved: ShortInt;


        ap_Strlen: SmallInt;


This is what ap_Length used to be

        ap_Info: TFileInfoBlock;


Info block of the found file

        ap_Buf: array [0..0] of Char;


Buffer start for full path output




Allocate this structure and initialize it as follows:

Set ap_BreakBits to the signal bits (DDB) that you want to take a break on, or nil, if you don't want to convenience the user.

If you want to have the full path name of the files you found, allocate a buffer at the end of this structure, and put the size of it into ap_Strlen. If you don't want the full path name, make sure you set ap_Strlen to 0. In this case, the name of the file, and stats are available in the ap_Info, as per usual.

Then call MatchFirst() and then afterwards, MatchNext() with this structure. You should check the return value each time and take the appropriate action, ultimately calling MatchEnd() when there are no more files and you are done. You can tell when you are done by checking for the normal DOS return code ERROR_NO_MORE_ENTRIES.

See also



Finds file that matches pattern



Finds the next file or directory that matches pattern



Free storage allocated for MatchFirst()/MatchNext()

Documentation generated on: 2017-01-10