diff options
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.98 2005/09/11 13:11:05 kls Exp $ + * $Id: tools.c 1.99 2005/09/25 12:56:06 kls Exp $ */ #include "tools.h" @@ -17,6 +17,7 @@ #include <sys/vfs.h> #include <time.h> #include <unistd.h> +#include <utime.h> #include "i18n.h" int SysLogLevel = 3; @@ -475,6 +476,12 @@ bool SpinUpDisk(const char *FileName) return false; } +void TouchFile(const char *FileName) +{ + if (utime(FileName, NULL) == -1 && errno != ENOENT) + LOG_ERROR_STR(FileName); +} + time_t LastModifiedTime(const char *FileName) { struct stat fs; |