summaryrefslogtreecommitdiff
path: root/zen/file_id_def.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
committerB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
commit320f1ae680d73da35a0cfe4846eb687d8616bcac (patch)
tree6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/file_id_def.h
parentMerge branch '11.6' into 'master' (diff)
parentadd upstream 11.7 (diff)
downloadFreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.gz
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.bz2
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.zip
Merge branch '11.7' into 'master'11.7
add upstream 11.7 See merge request opensource-tracking/FreeFileSync!31
Diffstat (limited to 'zen/file_id_def.h')
-rw-r--r--zen/file_id_def.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/zen/file_id_def.h b/zen/file_id_def.h
deleted file mode 100644
index d2d104d5..00000000
--- a/zen/file_id_def.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// *****************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 *
-// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved *
-// *****************************************************************************
-
-#ifndef FILE_ID_DEF_H_013287632486321493
-#define FILE_ID_DEF_H_013287632486321493
-
- #include <sys/stat.h>
-
-
-namespace zen
-{
-namespace impl { typedef struct ::stat StatDummy; } //sigh...
-
-using VolumeId = decltype(impl::StatDummy::st_dev);
-using FileIndex = decltype(impl::StatDummy::st_ino);
-
-
-struct FileId //always available on Linux, and *generally* available on Windows)
-{
- FileId() {}
- FileId(VolumeId volId, FileIndex fIdx) : volumeId(volId), fileIndex(fIdx)
- {
- if (volId == 0 || fIdx == 0)
- {
- volumeId = 0;
- fileIndex = 0;
- }
- }
- VolumeId volumeId = 0;
- FileIndex fileIndex = 0;
-
- bool operator==(const FileId&) const = default;
-};
-
-
-inline
-FileId generateFileId(const struct ::stat& fileInfo)
-{
- return FileId(fileInfo.st_dev, fileInfo.st_ino);
-}
-}
-
-#endif //FILE_ID_DEF_H_013287632486321493
bgstack15