summaryrefslogtreecommitdiff
path: root/zen/file_access.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-09-09 18:53:23 -0400
committerB Stack <bgstack15@gmail.com>2018-09-09 18:53:23 -0400
commiteb5d3e5df99de2c3d8da2e8bc7b12ed427465dba (patch)
tree0f0441755ff0e6d65e12222d4502c648bffd6a7c /zen/file_access.h
parent10.3 (diff)
downloadFreeFileSync-eb5d3e5df99de2c3d8da2e8bc7b12ed427465dba.tar.gz
FreeFileSync-eb5d3e5df99de2c3d8da2e8bc7b12ed427465dba.tar.bz2
FreeFileSync-eb5d3e5df99de2c3d8da2e8bc7b12ed427465dba.zip
pull in latest 10.4 from upstream
Diffstat (limited to 'zen/file_access.h')
-rwxr-xr-xzen/file_access.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/file_access.h b/zen/file_access.h
index c62ddc98..916f23f5 100755
--- a/zen/file_access.h
+++ b/zen/file_access.h
@@ -23,9 +23,9 @@ struct PathComponents
Zstring rootPath; //itemPath = rootPath + (FILE_NAME_SEPARATOR?) + relPath
Zstring relPath; //
};
-Opt<PathComponents> parsePathComponents(const Zstring& itemPath); //no value on failure
+std::optional<PathComponents> parsePathComponents(const Zstring& itemPath); //no value on failure
-Opt<Zstring> getParentFolderPath(const Zstring& itemPath);
+std::optional<Zstring> getParentFolderPath(const Zstring& itemPath);
//POSITIVE existence checks; if false: 1. item not existing 2. different type 3.device access error or similar
bool fileAvailable(const Zstring& filePath); //noexcept
@@ -42,7 +42,7 @@ enum class ItemType
//(hopefully) fast: does not distinguish between error/not existing
ItemType getItemType (const Zstring& itemPath); //throw FileError
//execute potentially SLOW folder traversal but distinguish error/not existing
-Opt<ItemType> getItemTypeIfExists(const Zstring& itemPath); //throw FileError
+std::optional<ItemType> getItemTypeIfExists(const Zstring& itemPath); //throw FileError
struct PathStatus
{
@@ -97,7 +97,7 @@ struct FileCopyResult
time_t modTime = 0; //number of seconds since Jan. 1st 1970 UTC
FileId sourceFileId;
FileId targetFileId;
- Opt<FileError> errorModTime; //failure to set modification time
+ std::optional<FileError> errorModTime; //failure to set modification time
};
FileCopyResult copyNewFile(const Zstring& sourceFile, const Zstring& targetFile, bool copyFilePermissions, //throw FileError, ErrorTargetExisting, ErrorFileLocked
bgstack15