• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/apr/file_io/unix/

Lines Matching refs:finfo

70 static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info,
73 finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
75 finfo->protection = apr_unix_mode2perms(info->st_mode);
76 finfo->filetype = filetype_from_mode(info->st_mode);
77 finfo->user = info->st_uid;
78 finfo->group = info->st_gid;
79 finfo->size = info->st_size;
80 finfo->device = info->st_dev;
81 finfo->nlink = info->st_nlink;
87 finfo->inode = info->st_ino;
89 finfo->valid &= ~APR_FINFO_INODE;
92 apr_time_ansi_put(&finfo->atime, info->st_atime);
94 finfo->atime += info->st_atim.tv_nsec / APR_TIME_C(1000);
96 finfo->atime += info->st_atimensec / APR_TIME_C(1000);
98 finfo->atime += info->st_atime_n / APR_TIME_C(1000);
101 apr_time_ansi_put(&finfo->mtime, info->st_mtime);
103 finfo->mtime += info->st_mtim.tv_nsec / APR_TIME_C(1000);
105 finfo->mtime += info->st_mtimensec / APR_TIME_C(1000);
107 finfo->mtime += info->st_mtime_n / APR_TIME_C(1000);
110 apr_time_ansi_put(&finfo->ctime, info->st_ctime);
112 finfo->ctime += info->st_ctim.tv_nsec / APR_TIME_C(1000);
114 finfo->ctime += info->st_ctimensec / APR_TIME_C(1000);
116 finfo->ctime += info->st_ctime_n / APR_TIME_C(1000);
121 finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)DEV_BSIZE;
123 finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)512;
125 finfo->valid |= APR_FINFO_CSIZE;
129 apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
141 finfo->pool = thefile->pool;
142 finfo->fname = thefile->fname;
143 fill_out_finfo(finfo, &info, wanted);
144 return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
151 APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
164 finfo->pool = thefile->pool;
165 finfo->fname = thefile->fname;
166 fill_out_finfo(finfo, &info, wanted);
167 return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
190 apr_finfo_t finfo;
197 status = apr_stat(&finfo, fname, APR_FINFO_PROT, pool);
206 finfo.protection &= ~APR_UWRITE;
207 finfo.protection &= ~APR_GWRITE;
208 finfo.protection &= ~APR_WWRITE;
213 finfo.protection |= APR_UWRITE;
214 finfo.protection |= APR_GWRITE;
215 finfo.protection |= APR_WWRITE;
224 finfo.protection |= APR_UEXECUTE;
225 finfo.protection |= APR_GEXECUTE;
226 finfo.protection |= APR_WEXECUTE;
230 finfo.protection &= ~APR_UEXECUTE;
231 finfo.protection &= ~APR_GEXECUTE;
232 finfo.protection &= ~APR_WEXECUTE;
236 return apr_file_perms_set(fname, finfo.protection);
245 apr_finfo_t finfo;
247 status = apr_stat(&finfo, fname, APR_FINFO_ATIME, pool);
256 tvp[0].tv_sec = apr_time_sec(finfo.atime);
257 tvp[0].tv_usec = apr_time_usec(finfo.atime);
269 buf.actime = (time_t) (finfo.atime / APR_USEC_PER_SEC);
284 APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
297 finfo->pool = pool;
298 finfo->fname = fname;
299 fill_out_finfo(finfo, &info, wanted);
302 return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;