summaryrefslogtreecommitdiff
path: root/firmware/include/filesystem-native.h
diff options
context:
space:
mode:
authorJames Buren <braewoods+rb@braewoods.net>2021-07-07 21:06:31 +0000
committerSolomon Peachy <pizza@shaftnet.org>2021-07-08 13:15:30 +0000
commitc174d3a544b92be55bc0d09443522386363129f5 (patch)
treec0462544de28dff56285a55ff2824daee06c0f34 /firmware/include/filesystem-native.h
parente6ee3dd17cf040cf38c8751c99edaec67f7a5ab5 (diff)
downloadrockbox-c174d3a544b92be55bc0d09443522386363129f5.tar.gz
rockbox-c174d3a544b92be55bc0d09443522386363129f5.zip
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
Diffstat (limited to 'firmware/include/filesystem-native.h')
-rw-r--r--firmware/include/filesystem-native.h3
1 files changed, 3 insertions, 0 deletions
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 @@
43#define __OPEN_MODE_ARG 43#define __OPEN_MODE_ARG
44#define __CREAT_MODE_ARG 44#define __CREAT_MODE_ARG
45 45
46#include <time.h>
47
46int open(const char *name, int oflag); 48int open(const char *name, int oflag);
47int creat(const char *name); 49int creat(const char *name);
48int close(int fildes); 50int close(int fildes);
@@ -53,6 +55,7 @@ ssize_t read(int fildes, void *buf, size_t nbyte);
53ssize_t write(int fildes, const void *buf, size_t nbyte); 55ssize_t write(int fildes, const void *buf, size_t nbyte);
54int remove(const char *path); 56int remove(const char *path);
55int rename(const char *old, const char *new); 57int rename(const char *old, const char *new);
58int utime(const char *path, const struct utimbuf* times);
56off_t filesize(int fildes); 59off_t filesize(int fildes);
57int fsamefile(int fildes1, int fildes2); 60int fsamefile(int fildes1, int fildes2);
58int relate(const char *path1, const char *path2); 61int relate(const char *path1, const char *path2);