diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/folder/dirut.h | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 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 ffb6c1ab99..2537027b12 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()); } |