1
0
mirror of https://github.com/facebook/zstd.git synced 2025-11-24 12:01:06 +03:00
Files
zstd/programs/util.h
W. Felix Handte a5a2418df4 Introduce Variants of Some Functions that Take Optional File Descriptors
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.
2023-02-06 13:55:34 -08:00

12 KiB