From c174d3a544b92be55bc0d09443522386363129f5 Mon Sep 17 00:00:00 2001 From: James Buren Date: Wed, 7 Jul 2021 21:06:31 +0000 Subject: file/fat: add utime function This emulates the traditional utime function from UNIX clones to allow for manual updates of the modification timestamp on files and directories. This should only prove useful for non-native targets as those usually have a libc version of utime. Change-Id: Iea8a1d328e78b92c400d3354ee80689c7cf53af8 --- firmware/include/filesystem-native.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'firmware/include/filesystem-native.h') diff --git a/firmware/include/filesystem-native.h b/firmware/include/filesystem-native.h index 640e179890..800e7bb23b 100644 --- a/firmware/include/filesystem-native.h +++ b/firmware/include/filesystem-native.h @@ -43,6 +43,8 @@ #define __OPEN_MODE_ARG #define __CREAT_MODE_ARG +#include + int open(const char *name, int oflag); int creat(const char *name); int close(int fildes); @@ -53,6 +55,7 @@ ssize_t read(int fildes, void *buf, size_t nbyte); ssize_t write(int fildes, const void *buf, size_t nbyte); int remove(const char *path); int rename(const char *old, const char *new); +int utime(const char *path, const struct utimbuf* times); off_t filesize(int fildes); int fsamefile(int fildes1, int fildes2); int relate(const char *path1, const char *path2); -- cgit v1.2.3