MCPcopy Create free account
hub / github.com/ElementsProject/elements / TruncateFile

Function TruncateFile

src/util/system.cpp:1196–1202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194}
1195
1196bool TruncateFile(FILE *file, unsigned int length) {
1197#if defined(WIN32)
1198 return _chsize(_fileno(file), length) == 0;
1199#else
1200 return ftruncate(fileno(file), length) == 0;
1201#endif
1202}
1203
1204/**
1205 * this function tries to raise the file descriptor limit to the requested number.

Callers 2

FlushMethod · 0.85
WriteFilterToDiskMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected