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

Function TruncateFile

src/util.cpp:1056–1062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1054}
1055
1056bool TruncateFile(FILE *file, unsigned int length) {
1057#if defined(WIN32)
1058 return _chsize(_fileno(file), length) == 0;
1059#else
1060 return ftruncate(fileno(file), length) == 0;
1061#endif
1062}
1063
1064/**
1065 * 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