Back to index

radiance  4R0+20100331
Functions | Variables
fdate.c File Reference
#include "copyright.h"
#include "rtio.h"
#include <sys/stat.h>
#include <utime.h>

Go to the source code of this file.

Functions

time_t fdate (char *fname)
int setfdate (char *fname, long ftim)

Variables

static const char RCSid [] = "$Id: fdate.c,v 2.8 2003/06/27 06:53:21 greg Exp $"

Function Documentation

time_t fdate ( char *  fname)

Definition at line 22 of file fdate.c.

{
       struct stat  sbuf;

       if (stat(fname, &sbuf) == -1)
              return(0);

       return(sbuf.st_mtime);
}

Here is the caller graph for this function:

int setfdate ( char *  fname,
long  ftim 
)

Definition at line 35 of file fdate.c.

{
       struct utimbuf utb;

       utb.actime = utb.modtime = ftim;
       return(utime(fname, &utb));

#ifdef NOTHING /* XXX does this work anywhere? */
       time_t  ftm[2];

       ftm[0] = ftm[1] = ftim;
       return(utime(fname, ftm));
#endif
}

Here is the caller graph for this function:


Variable Documentation

const char RCSid[] = "$Id: fdate.c,v 2.8 2003/06/27 06:53:21 greg Exp $" [static]

Definition at line 2 of file fdate.c.