MCPcopy Create free account
hub / github.com/catboost/catboost / truncate

Function truncate

util/system/compat.cpp:31–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 return _chsize_s(fd, length);
30}
31int truncate(const char* name, i64 length) {
32 int fd = ::_open(name, _O_WRONLY);
33 int ret = ftruncate(fd, length);
34 ::close(fd);
35 return ret;
36}
37#endif

Callers

nothing calls this directly

Calls 2

ftruncateFunction · 0.70
closeFunction · 0.50

Tested by

no test coverage detected