Code: Select all
Structure stat
st_dev.l; /* ID of device containing file */
st_ino.l; /* File serial number */
st_mode.w; /* Mode of file */
st_nlink.w; /* Number of hard links */
st_uid.w; /* User ID of the file */
st_gid.w; /* Group ID of the file */
st_rdev.l; /* Device ID */
st_size.l; /* file size, in bytes */
st_atimespec.i; /* time of last access */
st_mtimespec.i; /* time of last data modification */
st_ctimespec.i; /* time of last status change */
EndStructure
ImportC "msvcrt.lib"
_stat(path.p-ascii, *buf)
EndImport
Name.s = OpenFileRequester("Choose a file", "", "", 0)
_stat(Name, @stats.stat)
Debug FileSize(Name)
Debug "File size : " + stats\st_size
Debug "Last access : " + FormatDate("%yyyy/%mm/%dd", stats\st_atimespec)
CallDebugger