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

Class TOptions

util/folder/iterator.h:31–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 using TCompare = int (*)(const FTSENT**, const FTSENT**);
30
31 struct TOptions {
32 inline TOptions() {
33 Init(FTS_PHYSICAL);
34 }
35
36 inline TOptions(int opts) {
37 Init(opts);
38 }
39
40 inline TOptions& SetMaxLevel(size_t level) noexcept {
41 MaxLevel = level;
42
43 return *this;
44 }
45
46 inline TOptions& SetSortFunctor(TCompare cmp) noexcept {
47 Cmp = cmp;
48
49 return *this;
50 }
51
52 TOptions& SetSortByName() noexcept;
53
54 int FtsOptions;
55 size_t MaxLevel;
56 TCompare Cmp;
57
58 private:
59 inline void Init(int opts) noexcept {
60 FtsOptions = opts | FTS_NOCHDIR;
61 MaxLevel = Max<size_t>();
62 Cmp = nullptr;
63 }
64 };
65
66 inline TDirIterator(const TString& path, const TOptions& options = TOptions())
67 : Options_(options)

Callers 3

TDirIteratorMethod · 0.70
RemoveDirWithContentsFunction · 0.70
TestSortMethod · 0.70

Calls

no outgoing calls

Tested by 1

TestSortMethod · 0.56