MCPcopy Create free account
hub / github.com/LUX-Core/lux / TruncateFile

Function TruncateFile

src/util.cpp:708–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708bool TruncateFile(FILE* file, unsigned int length)
709{
710#if defined(WIN32)
711 return _chsize(_fileno(file), length) == 0;
712#else
713 return ftruncate(fileno(file), length) == 0;
714#endif
715}
716
717/**
718 * 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