aboutsummaryrefslogtreecommitdiffstats
path: root/util/folder
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:18 +0300
commit475c0a46f28166e83fd263badc7546377cddcabe (patch)
tree39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /util/folder
parenta6e0145a095c7bb3770d6e07aee301de5c73f96e (diff)
downloadydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/folder')
-rw-r--r--util/folder/dirut.cpp14
-rw-r--r--util/folder/dirut.h2
-rw-r--r--util/folder/path.cpp2
-rw-r--r--util/folder/tempdir.cpp18
-rw-r--r--util/folder/tempdir.h26
5 files changed, 31 insertions, 31 deletions
diff --git a/util/folder/dirut.cpp b/util/folder/dirut.cpp
index ffc9b09f96..b081c5e0f6 100644
--- a/util/folder/dirut.cpp
+++ b/util/folder/dirut.cpp
@@ -601,17 +601,17 @@ int ResolvePath(const char* rel, const char* abs, char res[/*MAXPATHLEN*/], bool
return 0;
}
-TString ResolvePath(const char* rel, const char* abs, bool isdir) {
+TString ResolvePath(const char* rel, const char* abs, bool isdir) {
char buf[PATH_MAX];
- if (ResolvePath(rel, abs, buf, isdir))
- ythrow yexception() << "cannot resolve path: \"" << rel << "\"";
+ if (ResolvePath(rel, abs, buf, isdir))
+ ythrow yexception() << "cannot resolve path: \"" << rel << "\"";
return buf;
}
-TString ResolvePath(const char* path, bool isDir) {
- return ResolvePath(path, nullptr, isDir);
-}
-
+TString ResolvePath(const char* path, bool isDir) {
+ return ResolvePath(path, nullptr, isDir);
+}
+
TString StripFileComponent(const TString& fileName) {
TString dir = IsDir(fileName) ? fileName : GetDirName(fileName);
if (!dir.empty() && dir.back() != GetDirectorySeparator()) {
diff --git a/util/folder/dirut.h b/util/folder/dirut.h
index 2537027b12..3e40048362 100644
--- a/util/folder/dirut.h
+++ b/util/folder/dirut.h
@@ -76,7 +76,7 @@ TString GetSystemTempDir();
int MakeTempDir(char path[/*FILENAME_MAX*/], const char* prefix);
int ResolvePath(const char* rel, const char* abs, char res[/*FILENAME_MAX*/], bool isdir = false);
-TString ResolvePath(const char* rel, const char* abs, bool isdir = false);
+TString ResolvePath(const char* rel, const char* abs, bool isdir = false);
TString ResolvePath(const char* path, bool isDir = false);
TString ResolveDir(const char* path);
diff --git a/util/folder/path.cpp b/util/folder/path.cpp
index bfe0c67d68..13df9269cb 100644
--- a/util/folder/path.cpp
+++ b/util/folder/path.cpp
@@ -3,7 +3,7 @@
#include "pathsplit.h"
#include <util/generic/yexception.h>
-#include <util/string/cast.h>
+#include <util/string/cast.h>
#include <util/system/compiler.h>
#include <util/system/file.h>
#include <util/system/fs.h>
diff --git a/util/folder/tempdir.cpp b/util/folder/tempdir.cpp
index 6fdf8f753c..cb4a2cc4ba 100644
--- a/util/folder/tempdir.cpp
+++ b/util/folder/tempdir.cpp
@@ -6,11 +6,11 @@
#include <util/system/maxlen.h>
TTempDir::TTempDir()
- : TTempDir(nullptr, TCreationToken{})
-{
-}
-
-TTempDir::TTempDir(const char* prefix, TCreationToken)
+ : TTempDir(nullptr, TCreationToken{})
+{
+}
+
+TTempDir::TTempDir(const char* prefix, TCreationToken)
: TempDir()
, Remove(true)
{
@@ -29,10 +29,10 @@ TTempDir::TTempDir(const TString& tempDir)
MakeDirIfNotExist(TempDir.c_str());
}
-TTempDir TTempDir::NewTempDir(const TString& root) {
- return {root.c_str(), TCreationToken{}};
-}
-
+TTempDir TTempDir::NewTempDir(const TString& root) {
+ return {root.c_str(), TCreationToken{}};
+}
+
void TTempDir::DoNotRemove() {
Remove = false;
}
diff --git a/util/folder/tempdir.h b/util/folder/tempdir.h
index ff458f83b9..6acea134eb 100644
--- a/util/folder/tempdir.h
+++ b/util/folder/tempdir.h
@@ -6,17 +6,17 @@
class TTempDir {
public:
- /// Create new directory in system tmp folder.
+ /// Create new directory in system tmp folder.
TTempDir();
-
- /// Create new directory with this fixed name. If it already exists, clear it.
+
+ /// Create new directory with this fixed name. If it already exists, clear it.
TTempDir(const TString& tempDir);
-
+
~TTempDir();
- /// Create new directory in given folder.
- static TTempDir NewTempDir(const TString& root);
-
+ /// Create new directory in given folder.
+ static TTempDir NewTempDir(const TString& root);
+
const TString& operator()() const {
return Name();
}
@@ -32,12 +32,12 @@ public:
void DoNotRemove();
private:
- struct TCreationToken {};
-
- // Prevent people from confusing this ctor with the public one
- // by requiring additional fake argument.
- TTempDir(const char* prefix, TCreationToken);
-
+ struct TCreationToken {};
+
+ // Prevent people from confusing this ctor with the public one
+ // by requiring additional fake argument.
+ TTempDir(const char* prefix, TCreationToken);
+
TFsPath TempDir;
bool Remove;
};