|
int | UTIL_requireUserConfirmation (const char *prompt, const char *abortMsg, const char *acceptableLetters, int hasStdinInput) |
|
int | UTIL_stat (const char *filename, stat_t *statbuf) |
|
int | UTIL_fstat (const int fd, const char *filename, stat_t *statbuf) |
|
int | UTIL_setFileStat (const char *filename, const stat_t *statbuf) |
|
int | UTIL_setFDStat (const int fd, const char *filename, const stat_t *statbuf) |
|
int | UTIL_utime (const char *filename, const stat_t *statbuf) |
|
int | UTIL_isRegularFileStat (const stat_t *statbuf) |
|
int | UTIL_isDirectoryStat (const stat_t *statbuf) |
|
int | UTIL_isFIFOStat (const stat_t *statbuf) |
|
int | UTIL_isBlockDevStat (const stat_t *statbuf) |
|
U64 | UTIL_getFileSizeStat (const stat_t *statbuf) |
|
int | UTIL_chmod (char const *filename, const stat_t *statbuf, mode_t permissions) |
|
int | UTIL_fchmod (const int fd, char const *filename, const stat_t *statbuf, mode_t permissions) |
|
int | UTIL_isRegularFile (const char *infilename) |
|
int | UTIL_isDirectory (const char *infilename) |
|
int | UTIL_isSameFile (const char *file1, const char *file2) |
|
int | UTIL_isSameFileStat (const char *file1, const char *file2, const stat_t *file1Stat, const stat_t *file2Stat) |
|
int | UTIL_isCompressedFile (const char *infilename, const char *extensionList[]) |
|
int | UTIL_isLink (const char *infilename) |
|
int | UTIL_isFIFO (const char *infilename) |
|
int | UTIL_isConsole (FILE *file) |
|
void | UTIL_fakeStdinIsConsole (void) |
|
void | UTIL_fakeStdoutIsConsole (void) |
|
void | UTIL_fakeStderrIsConsole (void) |
|
void | UTIL_traceFileStat (void) |
|
U64 | UTIL_getFileSize (const char *infilename) |
|
U64 | UTIL_getTotalFileSize (const char *const *fileNamesTable, unsigned nbFiles) |
|
UTIL_HumanReadableSize_t | UTIL_makeHumanReadableSize (U64 size) |
|
int | UTIL_compareStr (const void *p1, const void *p2) |
|
const char * | UTIL_getFileExtension (const char *infilename) |
|
void | UTIL_mirrorSourceFilesDirectories (const char **fileNamesTable, unsigned int nbFiles, const char *outDirName) |
|
char * | UTIL_createMirroredDestDirName (const char *srcFileName, const char *outDirRootName) |
|
FileNamesTable * | UTIL_createFileNamesTable_fromFileName (const char *inputFileName) |
|
FileNamesTable * | UTIL_assembleFileNamesTable (const char **filenames, size_t tableSize, char *buf) |
|
void | UTIL_freeFileNamesTable (FileNamesTable *table) |
|
FileNamesTable * | UTIL_mergeFileNamesTable (FileNamesTable *table1, FileNamesTable *table2) |
|
void | UTIL_expandFNT (FileNamesTable **fnt, int followLinks) |
|
FileNamesTable * | UTIL_createFNT_fromROTable (const char **filenames, size_t nbFilenames) |
|
FileNamesTable * | UTIL_allocateFileNamesTable (size_t tableSize) |
|
int | UTIL_searchFileNamesTable (FileNamesTable *table, char const *name) |
|
void | UTIL_refFilename (FileNamesTable *fnt, const char *filename) |
|
FileNamesTable * | UTIL_createExpandedFNT (const char *const *filenames, size_t nbFilenames, int followLinks) |
|
int | UTIL_countCores (int logical) |
|
int | UTIL_countPhysicalCores (void) |
|
int | UTIL_countLogicalCores (void) |
|
Like chmod(), but only modifies regular files. Provided statbuf may be NULL, in which case this function will stat() the file internally, in order to check whether it should be modified.
If fd is -1, fd is ignored and the filename is used.
Like chmod(), but only modifies regular files. Provided statbuf may be NULL, in which case this function will stat() the file internally, in order to check whether it should be modified.
UTIL_expandFNT() : read names from @fnt, and expand those corresponding to directories update @fnt, now containing only file names, note : in case of error, @fnt[0] is NULL
UTIL_expandFNT() : read names from @fnt, and expand those corresponding to directories update @fnt, now containing only file names,
- Returns
- : 0 in case of success, 1 if error note : in case of error, @fnt[0] is NULL
Instead of getting a file's stats, this updates them with the info in the provided stat_t. Currently sets owner, group, atime, and mtime. Will only update this info for regular files.
UTIL_setFDStat() also takes an fd, and will preferentially use that to indicate which file to modify, If fd is -1, it will fall back to using the filename.
Instead of getting a file's stats, this updates them with the info in the provided stat_t. Currently sets owner, group, atime, and mtime. Will only update this info for regular files.
Calls platform's equivalent of stat() on filename and writes info to statbuf. Returns success (1) or failure (0).
UTIL_fstat() is like UTIL_stat() but takes an optional fd that refers to the file in question. It turns out that this can be meaningfully faster. If fd is -1, behaves just like UTIL_stat() (i.e., falls back to using the filename).
Calls platform's equivalent of stat() on filename and writes info to statbuf. Returns success (1) or failure (0).