diff options
author | James Buren <braewoods+rb@braewoods.net> | 2021-07-11 13:48:26 +0000 |
---|---|---|
committer | James Buren <braewoods+rb@braewoods.net> | 2021-07-11 13:48:26 +0000 |
commit | d6dcb996847b547e1e980884fbc06966293a7f6a (patch) | |
tree | b50a1a640065f1a342a61423236af4009ae88368 | |
parent | 1298e4713447afd41a4158d172bf344e5317a09a (diff) | |
download | rockbox-d6dcb99684.tar.gz rockbox-d6dcb99684.zip |
uisimulator: implement sim_modtime
Change-Id: I1094632df092ba63605631333e939cf30b585a59
-rw-r--r-- | uisimulator/common/filesystem-sim.c | 10 | ||||
-rw-r--r-- | uisimulator/common/filesystem-sim.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/uisimulator/common/filesystem-sim.c b/uisimulator/common/filesystem-sim.c index 766beb3fda..8d7fb14931 100644 --- a/uisimulator/common/filesystem-sim.c +++ b/uisimulator/common/filesystem-sim.c @@ -569,6 +569,16 @@ int sim_rename(const char *old, const char *new) return rc; } +int sim_modtime(const char *path, time_t modtime) +{ + char ospath[SIM_TMPBUF_MAX_PATH]; + + if (sim_get_os_path(ospath, path, sizeof (ospath)) < 0) + return false; + + return os_modtime(ospath, modtime); +} + off_t sim_filesize(int fildes) { struct filestr_desc *filestr = get_filestr(fildes); diff --git a/uisimulator/common/filesystem-sim.h b/uisimulator/common/filesystem-sim.h index 7c46c449d8..346d6fa74e 100644 --- a/uisimulator/common/filesystem-sim.h +++ b/uisimulator/common/filesystem-sim.h @@ -68,6 +68,7 @@ ssize_t sim_read(int fildes, void *buf, size_t nbyte); ssize_t sim_write(int fildes, const void *buf, size_t nbyte); int sim_remove(const char *path); int sim_rename(const char *old, const char *new); +int sim_modtime(const char *path, time_t modtime); off_t sim_filesize(int fildes); int sim_fsamefile(int fildes1, int fildes2); int sim_relate(const char *path1, const char *path2); |