IOF_DATE
This trap reads or sets a file's date.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $4C | D0.L | Error code. |
D1.L | Set/read key. | D1.L | Date. |
D2.B | Type date key. | D2.L | Preserved. |
D3.W | Timeout. | D3.L | Preserved. |
A0.L | Channel ID. | A0.L | Preserved. |
Errors
Any IOSS errors.
Notes
- All registers not shown above are not used on entry and are preserved on exit.
- The value in D1.L should be one of:
- -1 to read the date and set it in D1.
- 0 to set the date to the current date.
- value to set the date to 'value'.
- D2.B should be set 0 for the update date and 2 for the backup date.
- If the update date has been set by this trap it will not be reset when the file is closed.
- The backup date can be altered even if the file has been opened for read only since that date is not stored in the file itself.
Example
The example below shows the use of this trap call to read a file's backup date. It is assumed that the channel ID is in A0.L.
moveq #$4C,d0 ; IOF_DATE moveq #-1,d1 ; Read date moveq #2,d2 ; Backup date moveq #-1,d3 ; Timeout trap #3 ; Get the backup date to D1.L tst.l d0 ; OK? . . bne.s oops ; . . NO! ... ; Do something here.