From 765e1bb3bdeb5c49f08543c20206e55c772e6b80 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Mon, 3 Apr 2023 09:56:38 -0400 Subject: add upstream 12.2 --- zen/file_access.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'zen/file_access.h') diff --git a/zen/file_access.h b/zen/file_access.h index 5af8b879..f6ac3740 100644 --- a/zen/file_access.h +++ b/zen/file_access.h @@ -8,7 +8,6 @@ #define FILE_ACCESS_H_8017341345614857 #include -#include #include "file_path.h" #include "file_error.h" #include "serialize.h" //IoCallback @@ -39,9 +38,9 @@ ItemType getItemType(const Zstring& itemPath); //throw FileError //execute potentially SLOW folder traversal but distinguish error/not existing: // - all child item path parts must correspond to folder traversal // => we can conclude whether an item is *not* existing anymore by doing a *case-sensitive* name search => potentially SLOW! -std::variant getItemTypeIfExists(const Zstring& itemPath); //throw FileError +std::optional getItemTypeIfExists(const Zstring& itemPath); //throw FileError -bool itemExists(const Zstring& itemPath); //throw FileError +inline bool itemExists(const Zstring& itemPath) { return static_cast(getItemTypeIfExists(itemPath)); } //throw FileError enum class ProcSymlink { @@ -80,8 +79,7 @@ void createDirectoryIfMissingRecursion(const Zstring& dirPath); //throw FileErro //symlink handling: follow //expects existing source/target directories -//reports "note-worthy" errors only -void tryCopyDirectoryAttributes(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError +void copyDirectoryAttributes(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError void copySymlink(const Zstring& sourcePath, const Zstring& targetPath); //throw FileError -- cgit