version 2003
PA_GetResourceTimeStamp (resFile; kind; resID) long
Parameter | Type | Description | |
resFile | short | File reference number of the file to access | |
kind | unsigned long | Kind (4 Bytes type) of resource to access | |
resID | short | Unique resource ID | |
Function result | long | TimeStamp of the resource (number of seconds | |
since midnight, January 1, 1904) |
Description
The routine PA_GetResourceTimeStamp returns the internal time-stamp of the resource type kind and the unique ID resID in the file referenced by resFile.
Each time a resource is created or modified, 4th Dimension stores a long corresponding to the date and time it is created/modified.
The returned value is the number of seconds since midnight, January, 1, 1904.
Under MacOS (or Windows+Altura), this long is obtained using GetDateTime. The values can then be extracted using SecondsToDate. Under Windows, some calculations will probably be necessary.
Example
Under MacOS or Windows+Altura, do something if the resources have been modified since June 25, 2000.
DateTimeRec dtr; unsigned long secs; secs = (unsigned long) PA_GetResourceTimeStamp(resFile, 'toto', 128); SecondsToDate(secs, &dtr); if( (dtr.day > 25) && (dtr.month > 6) && (dtr.year > 2000) ) { /* . . . resource modified since this date . . . */ }
See Also
No reference.
Error Handling
Use PA_GetLastError to see if an error occurred