aboutsummaryrefslogtreecommitdiffstats
path: root/util/folder
diff options
context:
space:
mode:
authorakhropov <akhropov@yandex-team.ru>2022-02-10 16:46:32 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:32 +0300
commit00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (patch)
treecb7a9f4a92c0d4cc5a86eeed49ad71e810953c1f /util/folder
parent83a8efcf3af051e3dd59c00d1d5dafc96412ec1e (diff)
downloadydb-00afc96e9c0298054b7386fa7fb9e3cc3d67b974.tar.gz
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/folder')
-rw-r--r--util/folder/dirut.cpp12
-rw-r--r--util/folder/dirut.h10
-rw-r--r--util/folder/filelist.cpp2
3 files changed, 12 insertions, 12 deletions
diff --git a/util/folder/dirut.cpp b/util/folder/dirut.cpp
index ffc9b09f96..8c03084069 100644
--- a/util/folder/dirut.cpp
+++ b/util/folder/dirut.cpp
@@ -375,12 +375,12 @@ char GetDirectorySeparator() {
const char* GetDirectorySeparatorS() {
return LOCSLASH_S;
}
-
+
void RemoveDirWithContents(TString dirName) {
- SlashFolderLocal(dirName);
-
+ SlashFolderLocal(dirName);
+
TDirIterator dir(dirName, TDirIterator::TOptions(FTS_NOSTAT));
-
+
for (auto it = dir.begin(); it != dir.end(); ++it) {
switch (it->fts_info) {
case FTS_F:
@@ -392,8 +392,8 @@ void RemoveDirWithContents(TString dirName) {
ythrow TSystemError() << "error while removing " << it->fts_path;
break;
}
- }
-}
+ }
+}
int mkpath(char* path, int mode) {
return NFs::MakeDirectoryRecursive(path, NFs::EFilePermission(mode)) ? 0 : -1;
diff --git a/util/folder/dirut.h b/util/folder/dirut.h
index 2537027b12..456f1f6ebb 100644
--- a/util/folder/dirut.h
+++ b/util/folder/dirut.h
@@ -18,15 +18,15 @@
#include <time.h>
#include <io.h>
#include "dirent_win.h"
-
+
// these live in mktemp_system.cpp
extern "C" int mkstemps(char* path, int slen);
char* mkdtemp(char* path);
-
+
#else
#ifdef _sun_
#include <alloca.h>
-
+
char* mkdtemp(char* path);
#endif
#include <unistd.h>
@@ -44,7 +44,7 @@ int mkpath(char* path, int mode = 0777);
TString GetHomeDir();
void MakeDirIfNotExist(const char* path, int mode = 0777);
-
+
inline void MakeDirIfNotExist(const TString& path, int mode = 0777) {
MakeDirIfNotExist(path.data(), mode);
}
@@ -60,7 +60,7 @@ char GetDirectorySeparator();
const char* GetDirectorySeparatorS();
void RemoveDirWithContents(TString dirName);
-
+
const char* GetFileNameComponent(const char* f);
inline TString GetFileNameComponent(const TString& f) {
diff --git a/util/folder/filelist.cpp b/util/folder/filelist.cpp
index b21fcdbf20..48ecc2d51f 100644
--- a/util/folder/filelist.cpp
+++ b/util/folder/filelist.cpp
@@ -27,7 +27,7 @@ void TFileEntitiesList::Fill(const TString& dirname, TStringBuf prefix, TStringB
TStringBuf filename = file->fts_path + dirNameLength + 1;
if (filename.empty() || !filename.StartsWith(prefix) || !filename.EndsWith(suffix)) {
- continue;
+ continue;
}
if (((Mask & EM_FILES) && file->fts_info == FTS_F) || ((Mask & EM_DIRS) && file->fts_info == FTS_D) || ((Mask & EM_SLINKS) && file->fts_info == FTS_SL)) {