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

Method Duplicate

util/system/file.cpp:1013–1021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011 }
1012
1013 TFile Duplicate() const {
1014 TFileHandle dupH(Handle_.Duplicate());
1015 if (!dupH.IsOpen()) {
1016 ythrow TFileError() << "can't duplicate the handle of " << FileName_.Quote();
1017 }
1018 TFile res(dupH);
1019 dupH.Release();
1020 return res;
1021 }
1022
1023 // Maximum amount of bytes to be read via single system call.
1024 // Some libraries fail when it is greater than max int.

Callers

nothing calls this directly

Calls 3

DuplicateMethod · 0.45
IsOpenMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected