diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/folder/dirut.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/folder/dirut.h')
-rw-r--r-- | util/folder/dirut.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/util/folder/dirut.h b/util/folder/dirut.h index 2537027b12..ffb6c1ab99 100644 --- a/util/folder/dirut.h +++ b/util/folder/dirut.h @@ -5,52 +5,52 @@ #include <util/system/fs.h> #include <util/generic/string.h> #include <util/generic/yexception.h> - + #include <sys/types.h> -#include <cerrno> -#include <cstdlib> - +#include <cerrno> +#include <cstdlib> + #ifdef _win32_ - #include <util/system/winint.h> - #include <direct.h> - #include <malloc.h> - #include <time.h> - #include <io.h> - #include "dirent_win.h" + #include <util/system/winint.h> + #include <direct.h> + #include <malloc.h> + #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); +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> - #include <pwd.h> - #include <dirent.h> - #ifndef DT_DIR - #include <sys/stat.h> - #endif + #ifdef _sun_ + #include <alloca.h> + +char* mkdtemp(char* path); + #endif + #include <unistd.h> + #include <pwd.h> + #include <dirent.h> + #ifndef DT_DIR + #include <sys/stat.h> + #endif #endif bool IsDir(const TString& path); -int mkpath(char* path, int mode = 0777); +int mkpath(char* path, int mode = 0777); TString GetHomeDir(); -void MakeDirIfNotExist(const char* path, int mode = 0777); +void MakeDirIfNotExist(const char* path, int mode = 0777); inline void MakeDirIfNotExist(const TString& path, int mode = 0777) { MakeDirIfNotExist(path.data(), mode); } /// Create path making parent directories as needed -void MakePathIfNotExist(const char* path, int mode = 0777); +void MakePathIfNotExist(const char* path, int mode = 0777); void SlashFolderLocal(TString& folder); bool correctpath(TString& filename); @@ -62,7 +62,7 @@ const char* GetDirectorySeparatorS(); void RemoveDirWithContents(TString dirName); const char* GetFileNameComponent(const char* f); - + inline TString GetFileNameComponent(const TString& f) { return GetFileNameComponent(f.data()); } |