diff options
author | mvel <mvel@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
commit | 43f5a35593ebc9f6bcea619bb170394ea7ae468e (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /util/system/fstat.cpp | |
parent | bd30392c4cc92487950adc375c07adf52da1d592 (diff) | |
download | ydb-43f5a35593ebc9f6bcea619bb170394ea7ae468e.tar.gz |
Restoring authorship annotation for <mvel@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/fstat.cpp')
-rw-r--r-- | util/system/fstat.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/util/system/fstat.cpp b/util/system/fstat.cpp index 27f0de682b..81e98cbc6b 100644 --- a/util/system/fstat.cpp +++ b/util/system/fstat.cpp @@ -3,7 +3,7 @@ #include <sys/stat.h> -#include <util/folder/path.h> +#include <util/folder/path.h> #include <cerrno> @@ -82,7 +82,7 @@ static bool GetStatByHandle(TSystemFStat& fs, FHANDLE f) { #endif } -static bool GetStatByName(TSystemFStat& fs, const char* fileName, bool nofollow) { +static bool GetStatByName(TSystemFStat& fs, const char* fileName, bool nofollow) { #ifdef _win_ TFileHandle h = NFsPrivate::CreateFileWithUtf8Name(fileName, FILE_READ_ATTRIBUTES | FILE_READ_EA, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING, @@ -92,7 +92,7 @@ static bool GetStatByName(TSystemFStat& fs, const char* fileName, bool nofollow) } return GetStatByHandle(fs, h); #else - return !(nofollow ? lstat : stat)(fileName, &fs); + return !(nofollow ? lstat : stat)(fileName, &fs); #endif } @@ -111,27 +111,27 @@ TFileStat::TFileStat(FHANDLE f) { } } -void TFileStat::MakeFromFileName(const char* fileName, bool nofollow) { +void TFileStat::MakeFromFileName(const char* fileName, bool nofollow) { TSystemFStat st; - if (GetStatByName(st, fileName, nofollow)) { + if (GetStatByName(st, fileName, nofollow)) { MakeStat(*this, st); } else { *this = TFileStat(); } } -TFileStat::TFileStat(const TFsPath& fileName, bool nofollow) { +TFileStat::TFileStat(const TFsPath& fileName, bool nofollow) { MakeFromFileName(fileName.GetPath().data(), nofollow); -} - +} + TFileStat::TFileStat(const TString& fileName, bool nofollow) { MakeFromFileName(fileName.data(), nofollow); -} - -TFileStat::TFileStat(const char* fileName, bool nofollow) { - MakeFromFileName(fileName, nofollow); -} - +} + +TFileStat::TFileStat(const char* fileName, bool nofollow) { + MakeFromFileName(fileName, nofollow); +} + bool TFileStat::IsNull() const noexcept { return *this == TFileStat(); } |