• Home
  • Raw
  • Download

Lines Matching refs:statbuf

285 UTIL_STATIC int UTIL_setFileStat(const char *filename, stat_t *statbuf)  in UTIL_setFileStat()  argument
294 timebuf.modtime = statbuf->st_mtime; in UTIL_setFileStat()
298 res += chown(filename, statbuf->st_uid, statbuf->st_gid); /* Copy ownership */ in UTIL_setFileStat()
301 res += chmod(filename, statbuf->st_mode & 07777); /* Copy file permissions */ in UTIL_setFileStat()
308 UTIL_STATIC int UTIL_getFileStat(const char* infilename, stat_t *statbuf) in UTIL_getFileStat() argument
312 r = _stat64(infilename, statbuf); in UTIL_getFileStat()
313 if (r || !(statbuf->st_mode & S_IFREG)) return 0; /* No good... */ in UTIL_getFileStat()
315 r = stat(infilename, statbuf); in UTIL_getFileStat()
316 if (r || !S_ISREG(statbuf->st_mode)) return 0; /* No good... */ in UTIL_getFileStat()
324 stat_t statbuf; in UTIL_isRegFile() local
325 …return UTIL_getFileStat(infilename, &statbuf); /* Only need to know whether it is a regular file */ in UTIL_isRegFile()
332 stat_t statbuf; in UTIL_isDirectory() local
334 r = _stat64(infilename, &statbuf); in UTIL_isDirectory()
335 if (!r && (statbuf.st_mode & _S_IFDIR)) return 1; in UTIL_isDirectory()
337 r = stat(infilename, &statbuf); in UTIL_isDirectory()
338 if (!r && S_ISDIR(statbuf.st_mode)) return 1; in UTIL_isDirectory()
348 struct __stat64 statbuf; in UTIL_getFileSize() local
349 r = _stat64(infilename, &statbuf); in UTIL_getFileSize()
350 if (r || !(statbuf.st_mode & S_IFREG)) return 0; /* No good... */ in UTIL_getFileSize()
352 struct _stati64 statbuf; in UTIL_getFileSize() local
353 r = _stati64(infilename, &statbuf); in UTIL_getFileSize()
354 if (r || !(statbuf.st_mode & S_IFREG)) return 0; /* No good... */ in UTIL_getFileSize()
356 struct stat statbuf; in UTIL_getFileSize() local
357 r = stat(infilename, &statbuf); in UTIL_getFileSize()
358 if (r || !S_ISREG(statbuf.st_mode)) return 0; /* No good... */ in UTIL_getFileSize()
360 return (U64)statbuf.st_size; in UTIL_getFileSize()