MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / TruncateFile

Function TruncateFile

src/commons/util/util.cpp:751–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749}
750
751bool TruncateFile(FILE* file, unsigned int length) {
752#if defined(WIN32)
753 return _chsize(_fileno(file), length) == 0;
754#else
755 return ftruncate(fileno(file), length) == 0;
756#endif
757}
758
759// this function tries to raise the file descriptor limit to the requested number.
760// It returns the actual file descriptor limit (which may be more or less than nMinFD)

Callers 1

FlushBlockFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected