diff options
author | Vasily Gerasimov <UgnineSirdis@gmail.com> | 2022-02-10 16:49:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:09 +0300 |
commit | 6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (patch) | |
tree | f69637041e6fed76ebae0c74ae1fa0c4be6ab5b4 /util/system/fs.h | |
parent | e5d4696304c6689379ac7ce334512404d4b7836c (diff) | |
download | ydb-6cdc8f140213c595e4ad38bc3d97fcef1146b8c3.tar.gz |
Restoring authorship annotation for Vasily Gerasimov <UgnineSirdis@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/system/fs.h')
-rw-r--r-- | util/system/fs.h | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/util/system/fs.h b/util/system/fs.h index 237daf2d2d..11161c3a79 100644 --- a/util/system/fs.h +++ b/util/system/fs.h @@ -4,7 +4,7 @@ #include <util/generic/string.h> #include <util/generic/yexception.h> -namespace NFs { +namespace NFs { enum EFilePermission { FP_ALL_EXEC = 01, FP_ALL_WRITE = 02, @@ -23,11 +23,11 @@ namespace NFs { Y_DECLARE_FLAGS(EFilePermissions, EFilePermission); - /// Remove a file or empty directory - /// - /// @param[in] path Path to file or directory - /// @returns true on success or false otherwise - /// LastSystemError() is set in case of failure + /// Remove a file or empty directory + /// + /// @param[in] path Path to file or directory + /// @returns true on success or false otherwise + /// LastSystemError() is set in case of failure bool Remove(const TString& path); /// Remove a file or directory with contents @@ -77,54 +77,54 @@ namespace NFs { return MakeDirectoryRecursive(path, FP_COMMON_FILE, false); } - /// Rename a file or directory. - /// Removes newPath if it exists - /// - /// @param[in] oldPath Path to file or directory to rename - /// @param[in] newPath New path of file or directory - /// @returns true on success or false otherwise - /// LastSystemError() is set in case of failure + /// Rename a file or directory. + /// Removes newPath if it exists + /// + /// @param[in] oldPath Path to file or directory to rename + /// @param[in] newPath New path of file or directory + /// @returns true on success or false otherwise + /// LastSystemError() is set in case of failure bool Rename(const TString& oldPath, const TString& newPath); - - /// Creates a new directory entry for a file - /// or creates a new one with the same content - /// - /// @param[in] existingPath Path to an existing file - /// @param[in] newPath New path of file + + /// Creates a new directory entry for a file + /// or creates a new one with the same content + /// + /// @param[in] existingPath Path to an existing file + /// @param[in] newPath New path of file void HardLinkOrCopy(const TString& existingPath, const TString& newPath); - - /// Creates a new directory entry for a file - /// - /// @param[in] existingPath Path to an existing file - /// @param[in] newPath New path of file - /// @returns true if new link was created or false otherwise - /// LastSystemError() is set in case of failure + + /// Creates a new directory entry for a file + /// + /// @param[in] existingPath Path to an existing file + /// @param[in] newPath New path of file + /// @returns true if new link was created or false otherwise + /// LastSystemError() is set in case of failure bool HardLink(const TString& existingPath, const TString& newPath); - - /// Creates a symlink to a file - /// - /// @param[in] targetPath Path to a target file - /// @param[in] linkPath Path of symlink - /// @returns true if new link was created or false otherwise - /// LastSystemError() is set in case of failure + + /// Creates a symlink to a file + /// + /// @param[in] targetPath Path to a target file + /// @param[in] linkPath Path of symlink + /// @returns true if new link was created or false otherwise + /// LastSystemError() is set in case of failure bool SymLink(const TString& targetPath, const TString& linkPath); - - /// Reads value of a symbolic link - /// - /// @param[in] path Path to a symlink - /// @returns File path that a symlink points to + + /// Reads value of a symbolic link + /// + /// @param[in] path Path to a symlink + /// @returns File path that a symlink points to TString ReadLink(const TString& path); - - /// Append contents of a file to a new file - /// - /// @param[in] dstPath Path to a destination file - /// @param[in] srcPath Path to a source file + + /// Append contents of a file to a new file + /// + /// @param[in] dstPath Path to a destination file + /// @param[in] srcPath Path to a source file void Cat(const TString& dstPath, const TString& srcPath); - - /// Copy contents of a file to a new file - /// - /// @param[in] existingPath Path to an existing file - /// @param[in] newPath New path of file + + /// Copy contents of a file to a new file + /// + /// @param[in] existingPath Path to an existing file + /// @param[in] newPath New path of file void Copy(const TString& existingPath, const TString& newPath); /// Returns path to the current working directory |