Unit 'AmigaDOS' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

ExAll

Examine an entire directory

Declaration

Source position: amigados.pas line 1927

function ExAll(

  lock: LongInt;

  buffer: PExAllData;

  size: LongInt;

  data: LongInt;

  control: PExAllControl

):LongBool;

Arguments

lock

  

Lock on the directory to be examined

buffer

  

Buffer for the data that is returned (must be aligned) which is filled with (partial) TExAllData structures

size

  

Size of buffer

data

  

Type of the data to be returned

control

  

A control structure allocated by AllocDosObject()

Function result

An indicator of if ExAll() is done. If False is returned, either ExAll() has completed in which case IoErr() is ERROR_NO_MORE_ENTRIES or an error occurred. If a True is returned ExAll() must be called again until it returns False.

Description

Lock must be on a directory. Size is the size of the buffer supplied. The buffer will be filled with (partial) ExAllData structures, as specified by the type field.

ed_Type is a value from those shown below that determines which information is to be stored in the buffer. Each higher value adds a new thing to the list as described in the table below:

ED_NAME
FileName
ED_TYPE
Type
ED_SIZE
Size in bytes
ED_PROTECTION
Protection bits
ED_DATE
3 longwords of date
ED_COMMENT
Comment (will be nil if no comment)
ED_OWNER
Owner user-id and Group-id

Thus, ED_OWNER gives only filenames, and ED_OWNER gives everything.

The ed_Next entry gives a pointer to the next entry in the buffer. The last entry will have nil in ed_Next.

This is an incremental list meaning that if you specify ED_OWNER you will get all attributes!

Filesystems that support ExAll() must support at least up to ED_COMMENT. If a filesystem doesn't support a particular type, ERROR_BAD_NUMBER must be returned.

ed_Next
Pointer to the next entry in the buffer. The last entry has a nil value for ed_Next.
The control structure have the following fields.
eac_Entries
the number of entries in the buffer after a call to ExAll(). Make sure that your code handles the case when eac_Entries is 0 and ExAll() returns True.
eac_LastKey
Must be initialized to 0 before calling ExAll() for the first time.
eac_MatchString
If nil then information on all files will be returned. If non-nil it's interpreted as a pointer to a string used for pattern matching which files to return information on. This string must have been parsed by ParsePatternNoCase()!
ac_MatchFunc
to a hook that will be called to decide if an entry should be included in the buffer. If nil, no matching function will be called. The hook is called as follows

See also

ExAllEnd

  

Stop an ExAll()

AllocDosObject

  

Creates a dos object


Documentation generated on: 2021-07-30