mirror of
https://github.com/facebook/zstd.git
synced 2025-07-06 15:45:37 +02:00
Somewhat surprisingly, calling `fchmod()` is non-trivially faster than calling `chmod()`, and so on. This commit introduces alternate variants to some common file util functions that take an optional fd. If present, they call the `f`-variant of the underlying function. Otherwise, they fall back to the regular filename-taking version of the function.
19 lines
561 B
Plaintext
19 lines
561 B
Plaintext
Trace:FileStat: > UTIL_isLink(file.zst)
|
|
Trace:FileStat: < 0
|
|
Trace:FileStat: > UTIL_isConsole(1)
|
|
Trace:FileStat: < 0
|
|
Trace:FileStat: > UTIL_isConsole(2)
|
|
Trace:FileStat: < 0
|
|
Trace:FileStat: > UTIL_isDirectory(file.zst)
|
|
Trace:FileStat: > UTIL_stat(-1, file.zst)
|
|
Trace:FileStat: < 1
|
|
Trace:FileStat: > UTIL_isDirectoryStat()
|
|
Trace:FileStat: < 0
|
|
Trace:FileStat: < 0
|
|
Trace:FileStat: > UTIL_stat(-1, file.zst)
|
|
Trace:FileStat: < 1
|
|
Trace:FileStat: > UTIL_isRegularFile(/*stdout*\)
|
|
Trace:FileStat: > UTIL_stat(-1, /*stdout*\)
|
|
Trace:FileStat: < 0
|
|
Trace:FileStat: < 0
|