Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#amunits]

tAnchorPath

Structure expected by MatchFirst(), MatchNext() to find Files.

Declaration

Source position: amigados.pas line 401

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

      );

end;

Description

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

MatchFirst

  

Finds file that matches pattern

MatchNext

  

Finds the next file or directory that matches pattern

MatchEnd

  

Free storage allocated for MatchFirst()/MatchNext()


Documentation generated on: 2021-07-30