summaryrefslogtreecommitdiff
path: root/zen/file_access.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-09-10 02:46:25 +0000
committerB Stack <bgstack15@gmail.com>2018-09-10 02:46:25 +0000
commit728d32e6da9ce66968f8eef47a59505d613e2c1b (patch)
tree0f0441755ff0e6d65e12222d4502c648bffd6a7c /zen/file_access.h
parent10.3 (diff)
parentpull in latest 10.4 from upstream (diff)
downloadFreeFileSync-728d32e6da9ce66968f8eef47a59505d613e2c1b.tar.gz
FreeFileSync-728d32e6da9ce66968f8eef47a59505d613e2c1b.tar.bz2
FreeFileSync-728d32e6da9ce66968f8eef47a59505d613e2c1b.zip
Merge branch '10.4' into 'master'10.4
pull in latest 10.4 from upstream See merge request opensource-tracking/FreeFileSync!1
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