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);