std-file-systime, std-file-modtime


Synopsis

(std-file-systime <fname>) ; => CDATE

(std-file-modtime <fname>) ; => internal time (seconds since 1/1/1970)

Description

std-file-systime returns the date of the creation or last update of the file in CDATE format if it exists or nil.

You might also consider using the function std-file-modtime which uses the internal time format, the number of seconds since 1/1/1970, often used in filesystems for datestamps. With external extensions loaded, std-file-modtime may be computed faster than std-file-systime and more accurate.

For conversions exist these functions:

(STD-%INTERNAL-TIME->CDATE. modtime) => cdate

(STD-%DATLST->INTERNAL-TIME datlst) => modtime

Note

This is different to the vl[x] extension with the same name. vl-file-systime returns the timestamp in datlst format. We changed it to return a CDATE number to be able to perform numerical comparison faster. Which file is newest?

Examples

(std-file-systime "/acad/")  	=> 19971230.202520
(std-file-systime "/acad/test.lsp")	=> 19980130.0025

Arguments

fname: a string. A partial or fully qualified filename specifier.

Return Value

A number or nil.

std-file-modtime usually returns an integer number, std-file-systime always a real.

Side Effects

None.

Module

(std-require 'STDFILE)

Defined in STDFILE