summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
Diffstat (limited to 'file_io')
-rw-r--r--file_io/netware/filestat.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/file_io/netware/filestat.c b/file_io/netware/filestat.c
index 2996676a9..bf3776208 100644
--- a/file_io/netware/filestat.c
+++ b/file_io/netware/filestat.c
@@ -77,6 +77,28 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
*/
}
+apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
+ apr_file_t *thefile)
+{
+ struct_stat info;
+
+ if (thefile->buffered) {
+ apr_status_t rv = apr_file_flush_locked(thefile);
+ if (rv != APR_SUCCESS)
+ return rv;
+ }
+
+ if (fstat(thefile->filedes, &info) == 0) {
+ finfo->pool = thefile->pool;
+ finfo->fname = thefile->fname;
+ fill_out_finfo(finfo, &info, wanted);
+ return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
+ }
+ else {
+ return errno;
+ }
+}
+
APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
apr_int32_t wanted,
apr_file_t *thefile)