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

Function TruncateFile

src/util.cpp:618–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616}
617
618bool TruncateFile(FILE *file, unsigned int length) {
619#if defined(WIN32)
620 return _chsize(_fileno(file), length) == 0;
621#else
622 return ftruncate(fileno(file), length) == 0;
623#endif
624}
625
626/**
627 * this function tries to raise the file descriptor limit to the requested number.

Callers 1

FlushBlockFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected