diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | 863a59a65247c24db7cb06789bc5cf79d04da32f (patch) | |
tree | 139dc000c8cd4a40f5659e421b7c75135d080307 /util/folder | |
parent | f64e95a9eb9ab03240599eb9581c5a9102426a96 (diff) | |
download | ydb-863a59a65247c24db7cb06789bc5cf79d04da32f.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/folder')
-rw-r--r-- | util/folder/dirent_win.c | 8 | ||||
-rw-r--r-- | util/folder/dirut.cpp | 2 | ||||
-rw-r--r-- | util/folder/filelist.cpp | 2 | ||||
-rw-r--r-- | util/folder/filelist.h | 20 | ||||
-rw-r--r-- | util/folder/iterator.h | 2 | ||||
-rw-r--r-- | util/folder/iterator_ut.cpp | 6 |
6 files changed, 20 insertions, 20 deletions
diff --git a/util/folder/dirent_win.c b/util/folder/dirent_win.c index 7e6db74ce5..5bc2634dd6 100644 --- a/util/folder/dirent_win.c +++ b/util/folder/dirent_win.c @@ -12,10 +12,10 @@ static void SetErrno() { _dosmaperr(GetLastError()); } #else -void __cdecl __acrt_errno_map_os_error(unsigned long const oserrno); - -static void SetErrno() { - __acrt_errno_map_os_error(GetLastError()); +void __cdecl __acrt_errno_map_os_error(unsigned long const oserrno); + +static void SetErrno() { + __acrt_errno_map_os_error(GetLastError()); } #endif diff --git a/util/folder/dirut.cpp b/util/folder/dirut.cpp index ffc9b09f96..4c77f35aa9 100644 --- a/util/folder/dirut.cpp +++ b/util/folder/dirut.cpp @@ -381,7 +381,7 @@ void RemoveDirWithContents(TString dirName) { TDirIterator dir(dirName, TDirIterator::TOptions(FTS_NOSTAT)); - for (auto it = dir.begin(); it != dir.end(); ++it) { + for (auto it = dir.begin(); it != dir.end(); ++it) { switch (it->fts_info) { case FTS_F: case FTS_DEFAULT: diff --git a/util/folder/filelist.cpp b/util/folder/filelist.cpp index b21fcdbf20..79ba2f9b9c 100644 --- a/util/folder/filelist.cpp +++ b/util/folder/filelist.cpp @@ -19,7 +19,7 @@ void TFileEntitiesList::Fill(const TString& dirname, TStringBuf prefix, TStringB --dirNameLength; } - for (auto file = dir.begin(); file != dir.end(); ++file) { + for (auto file = dir.begin(); file != dir.end(); ++file) { if (file->fts_pathlen == file->fts_namelen || file->fts_pathlen <= dirNameLength) { continue; } diff --git a/util/folder/filelist.h b/util/folder/filelist.h index 3f615fa4c2..1c200eb4e1 100644 --- a/util/folder/filelist.h +++ b/util/folder/filelist.h @@ -3,21 +3,21 @@ #include <util/generic/buffer.h> #include <util/generic/string.h> #include <util/generic/strbuf.h> -#include <util/generic/flags.h> +#include <util/generic/flags.h> class TFileEntitiesList { public: - enum EMaskFlag { + enum EMaskFlag { EM_FILES = 1, EM_DIRS = 2, EM_SLINKS = 4, - - EM_FILES_DIRS = EM_FILES | EM_DIRS, - EM_FILES_SLINKS = EM_FILES | EM_SLINKS, - EM_DIRS_SLINKS = EM_DIRS | EM_SLINKS, - EM_FILES_DIRS_SLINKS = EM_FILES | EM_DIRS | EM_SLINKS + + EM_FILES_DIRS = EM_FILES | EM_DIRS, + EM_FILES_SLINKS = EM_FILES | EM_SLINKS, + EM_DIRS_SLINKS = EM_DIRS | EM_SLINKS, + EM_FILES_DIRS_SLINKS = EM_FILES | EM_DIRS | EM_SLINKS }; - Y_DECLARE_FLAGS(EMask, EMaskFlag) + Y_DECLARE_FLAGS(EMask, EMaskFlag) TFileEntitiesList(EMask mask) : Mask(mask) @@ -62,8 +62,8 @@ protected: EMask Mask; }; -Y_DECLARE_OPERATORS_FOR_FLAGS(TFileEntitiesList::EMask) - +Y_DECLARE_OPERATORS_FOR_FLAGS(TFileEntitiesList::EMask) + class TFileList: public TFileEntitiesList { public: TFileList() diff --git a/util/folder/iterator.h b/util/folder/iterator.h index 69e025b9c4..f6d953f9c4 100644 --- a/util/folder/iterator.h +++ b/util/folder/iterator.h @@ -9,7 +9,7 @@ /// Note this magic API traverses directory hierarchy -class TDirIterator: public TInputRangeAdaptor<TDirIterator> { +class TDirIterator: public TInputRangeAdaptor<TDirIterator> { struct TFtsDestroy { static inline void Destroy(FTS* f) noexcept { yfts_close(f); diff --git a/util/folder/iterator_ut.cpp b/util/folder/iterator_ut.cpp index 936becd139..acbcb6a336 100644 --- a/util/folder/iterator_ut.cpp +++ b/util/folder/iterator_ut.cpp @@ -93,7 +93,7 @@ private: inline void TestLocal() { TString dirname("." LOCSLASH_S); TDirIterator d(dirname, FTS_NOCHDIR); - for (auto it = d.begin(); it != d.end(); ++it) { + for (auto it = d.begin(); it != d.end(); ++it) { } } @@ -129,7 +129,7 @@ private: TDirIterator d(dir); - for (auto it = d.begin(); it != d.end(); ++it) { + for (auto it = d.begin(); it != d.end(); ++it) { UNIT_ASSERT(hier.Have(it->fts_path, it->fts_info != FTS_F)); } } @@ -197,7 +197,7 @@ private: { TDirIterator d(dir, TDirIterator::TOptions().SetSortByName()); - for (auto it = d.begin(); it != d.end(); ++it) { + for (auto it = d.begin(); it != d.end(); ++it) { if (it->fts_info == FTS_F) { fnames.push_back(it->fts_name); } |