[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:39:05 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=358adfc
The following commit has been merged in the master branch:
commit 358adfce0414aa78bdcb1f9ae9f8caa920aa5636
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sun Dec 9 08:00:26 2007 +0000
Added writeFile() convenience function.
---
src/basicio.cpp | 9 +++++++++
src/basicio.hpp | 3 +++
2 files changed, 12 insertions(+)
diff --git a/src/basicio.cpp b/src/basicio.cpp
index 9692fb3..e616543 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -614,4 +614,13 @@ namespace Exiv2 {
return buf;
}
+ long writeFile(const DataBuf& buf, const std::string& path)
+ {
+ FileIo file(path);
+ if (file.open("wb") != 0) {
+ throw Error(10, path, "wb", strError());
+ }
+ return file.write(buf.pData_, buf.size_);
+ }
+
} // namespace Exiv2
diff --git a/src/basicio.hpp b/src/basicio.hpp
index 60f8ae2..af4b154 100644
--- a/src/basicio.hpp
+++ b/src/basicio.hpp
@@ -683,6 +683,9 @@ namespace Exiv2 {
//! Read file \em path into a DataBuf, which is returned.
DataBuf readFile(const std::string& path);
+ //! Write DataBuf \em buf to file \em path. Return the number of bytes written.
+ long writeFile(const DataBuf& buf, const std::string& path);
+
} // namespace Exiv2
#endif // #ifndef BASICIO_HPP_
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list