summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authorbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2005-07-16 08:07:53 +0000
committerbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2005-07-16 08:07:53 +0000
commit46d803d44ea8d04857284d280568e57b651a3a7f (patch)
treea298f9fb8910e4f72e1e755122d94e87d0440473 /file_io
parent773b674582007d5888ee0aa2b7f05b1c8601f205 (diff)
downloadlibapr-46d803d44ea8d04857284d280568e57b651a3a7f.tar.gz
OS/2: Implement apr_file_mtime_set().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@219295 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r--file_io/os2/filestat.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/file_io/os2/filestat.c b/file_io/os2/filestat.c
index 0414c7150..e6410e254 100644
--- a/file_io/os2/filestat.c
+++ b/file_io/os2/filestat.c
@@ -225,5 +225,16 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
apr_time_t mtime,
apr_pool_t *pool)
{
- return APR_ENOTIMPL;
+ FILESTATUS3 fs3;
+ ULONG rc;
+ rc = DosQueryPathInfo(fname, FIL_STANDARD, &fs3, sizeof(fs3));
+
+ if (rc) {
+ return APR_FROM_OS_ERROR(rc);
+ }
+
+ apr_apr_time_to_os2_time(&fs3.fdateLastWrite, &fs3.ftimeLastWrite, mtime);
+
+ rc = DosSetPathInfo(fname, FIL_STANDARD, &fs3, sizeof(fs3), 0);
+ return APR_FROM_OS_ERROR(rc);
}