Lines Matching refs:file_stat

45 	inline void set_file_type(const struct stat& file_stat, oslFileStatus* pStat)  in set_file_type()  argument
48 if (S_ISLNK(file_stat.st_mode)) in set_file_type()
50 else if (S_ISDIR(file_stat.st_mode)) in set_file_type()
52 else if (S_ISREG(file_stat.st_mode)) in set_file_type()
54 else if (S_ISFIFO(file_stat.st_mode)) in set_file_type()
56 else if (S_ISSOCK(file_stat.st_mode)) in set_file_type()
58 else if (S_ISCHR(file_stat.st_mode) || S_ISBLK(file_stat.st_mode)) in set_file_type()
66 inline void set_file_access_mask(const struct stat& file_stat, oslFileStatus* pStat) in set_file_access_mask() argument
69 if (S_IRUSR & file_stat.st_mode) in set_file_access_mask()
72 if (S_IWUSR & file_stat.st_mode) in set_file_access_mask()
75 if (S_IXUSR & file_stat.st_mode) in set_file_access_mask()
79 if (S_IRGRP & file_stat.st_mode) in set_file_access_mask()
82 if (S_IWGRP & file_stat.st_mode) in set_file_access_mask()
85 if (S_IXGRP & file_stat.st_mode) in set_file_access_mask()
89 if (S_IROTH & file_stat.st_mode) in set_file_access_mask()
92 if (S_IWOTH & file_stat.st_mode) in set_file_access_mask()
95 if (S_IXOTH & file_stat.st_mode) in set_file_access_mask()
101 …inline void set_file_access_rights(const struct stat& file_stat, int S_IR, int S_IW, int S_IX, osl… in set_file_access_rights() argument
112 if ((0 == (S_IW & file_stat.st_mode)) && (S_IR & file_stat.st_mode)) in set_file_access_rights()
115 if (S_IX & file_stat.st_mode) in set_file_access_rights()
147 inline void set_file_access_rights(const struct stat& file_stat, oslFileStatus* pStat) in set_file_access_rights() argument
149 if (getuid() == file_stat.st_uid) in set_file_access_rights()
151 set_file_access_rights(file_stat, S_IRUSR, S_IWUSR, S_IXUSR, pStat); in set_file_access_rights()
153 else if (is_in_process_grouplist(file_stat.st_gid)) in set_file_access_rights()
155 set_file_access_rights(file_stat, S_IRGRP, S_IWGRP, S_IXGRP, pStat); in set_file_access_rights()
159 set_file_access_rights(file_stat, S_IROTH, S_IWOTH, S_IXOTH, pStat); in set_file_access_rights()
172 …const rtl::OUString& file_path, const struct stat& file_stat, const sal_uInt32 uFieldMask, oslFile… in set_file_attributes() argument
175 set_file_access_mask(file_stat, pStat); in set_file_attributes()
180 set_file_access_rights(file_stat, pStat); in set_file_attributes()
183 inline void set_file_access_time(const struct stat& file_stat, oslFileStatus* pStat) in set_file_access_time() argument
185 pStat->aAccessTime.Seconds = file_stat.st_atime; in set_file_access_time()
190 inline void set_file_modify_time(const struct stat& file_stat, oslFileStatus* pStat) in set_file_modify_time() argument
192 pStat->aModifyTime.Seconds = file_stat.st_mtime; in set_file_modify_time()
197 inline void set_file_size(const struct stat& file_stat, oslFileStatus* pStat) in set_file_size() argument
199 if (S_ISREG(file_stat.st_mode)) in set_file_size()
201 pStat->uFileSize = file_stat.st_size; in set_file_size()
267 struct ::stat file_stat; in osl_getFileStatus() local
269 struct stat file_stat; in osl_getFileStatus() local
273 if (bStatNeeded && (0 != osl::lstat(file_path, file_stat))) in osl_getFileStatus()
279 set_file_type(file_stat, pStat); in osl_getFileStatus()
280 set_file_access_time(file_stat, pStat); in osl_getFileStatus()
281 set_file_modify_time(file_stat, pStat); in osl_getFileStatus()
282 set_file_size(file_stat, pStat); in osl_getFileStatus()
283 set_file_attributes(file_path, file_stat, uFieldMask, pStat); in osl_getFileStatus()
286 if ((uFieldMask & osl_FileStatus_Mask_LinkTargetURL) && S_ISLNK(file_stat.st_mode)) in osl_getFileStatus()