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

Method TDirIterator

util/folder/iterator.h:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 };
65
66 inline TDirIterator(const TString& path, const TOptions& options = TOptions())
67 : Options_(options)
68 , Path_(path)
69 {
70 Trees_[0] = Path_.begin();
71 Trees_[1] = nullptr;
72
73 FileTree_.Reset(yfts_open(Trees_, Options_.FtsOptions, Options_.Cmp));
74
75 if (!FileTree_.Get() || FileTree_->fts_cur->fts_link->fts_errno) {
76 ythrow TError(FileTree_.Get() ? FileTree_->fts_cur->fts_link->fts_errno : LastSystemError()) << "can not open '" << Path_ << "'";
77 }
78 }
79
80 inline FTSENT* Next() {
81 FTSENT* ret = yfts_read(FileTree_.Get());

Callers

nothing calls this directly

Calls 6

yfts_openFunction · 0.85
LastSystemErrorFunction · 0.85
TOptionsClass · 0.70
beginMethod · 0.45
ResetMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected