Please enable JavaScript to view this site.

A-Shell Reference

Reviewed and revised December 2023

tab(-10, AG_FILETIMES); fspec, opcode {,loc'rem, mtime, ctime, atime}; chr(127);     Tab(-10,x) Syntax Notes

AG_FILETIMES (113) provides a way to set a file's last modification time (mtime), creation time (ctime), and/or last access time (atime). Setting the mtime of a file is equivalent in the Unix world to using the touch command on the file. For convenience, the function can also retrieve the file times, overlapping functionality already provided by MX_FILESTATS.

This function has both a subroutine and a print tab implementation.

Parameters

fspec

file spec (client perspective) to get or set times for

opcode

0 = get (MXOP_GET) or 1 = set (MXOP_sET)

loc'rem

C to check cache directories, else fspec must be fully qualified

mtime, ctime, atime

modify, create, and access times to set (opcode 1), in seconds since the epoch.

Response

status, mtime, ctime, atime CR

status is 0 for success, else a Windows error code. Times are seconds since the epoch.

Comments

Note that access time isn't uniformly supported across Windows systems.

See Also

MX_FTFORMAT to convert time values into human-readable form

History

2023 August, A-Shell 6.5.1740:  Function added to A-Shell