aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-06-28 07:13:58 +0200
committerSven Gothel <[email protected]>2022-06-28 07:13:58 +0200
commit248787b3354642a240347feb16a1673b786aa2b4 (patch)
tree076005e86f79b11959db3075b5dca6115e3c5f9c /include
parent3345803cb04594e14673c93556e7561bf8aef239 (diff)
test_bytestream (C++, Java): Byte-compare source w/ destination; Java: Add FileUtil mapping jau::fs::file_util.hpp functionality
- FileUtil.compare() is covered via TestByteStream01 - Not mapped: - dir_item - fmode_t - file_stats TODO - Test CopyOptions and TraverseOptions - Partially copy test_fileutils01.cpp and testsudo_fileutils02.cpp - copy() - remove() - mount_image()
Diffstat (limited to 'include')
-rw-r--r--include/jau/file_util.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/jau/file_util.hpp b/include/jau/file_util.hpp
index b85896c..1f2bf7b 100644
--- a/include/jau/file_util.hpp
+++ b/include/jau/file_util.hpp
@@ -805,6 +805,16 @@ namespace jau {
bool compare(const file_stats& source1, const file_stats& source2, const bool verbose=false) noexcept;
/**
+ * Compare the bytes of both files, denoted by source1 and source2.
+ *
+ * @param source1 first source file to compare
+ * @param source2 second source file to compare
+ * @param verbose defaults to false
+ * @return true if both elements are files and their bytes are equal, otherwise false.
+ */
+ bool compare(const std::string& source1, const std::string& source2, const bool verbose=false) noexcept;
+
+ /**
* Filesystem copy options used to copy() path elements.
*
* By default, the fmode_t POSIX protection mode bits are preserved