Re: File Mod Time

From: Mathue Moyer (mmoyer@sdcc10.UCSD.EDU)
Date: 09/06/94


>
>Any idea how you can (from with the mud code) get a value for the last time
>a particular file was modified - ie the last save date?
>

include <sys/stat.h>
include <unistd.h>

time_t modified_time;

stat(const char*file_name, stat *buf);
modified_time = buf.st_mtime;

This is the basic gist of it, as gleaned from the man pages
for stat().  I'd suggest reading said pages to get a better
understanding than the minimal code I listed above.  ;)

-- 
-Mathue Moyer
-mathue@ucsd.edu



This archive was generated by hypermail 2b30 : 12/07/00 PST