51 Data::write (boost::filesystem::path file)
const
55 throw FileError (
"could not write to file", file, errno);
57 if (f.write(data(), 1, size()) !=
size_t(size())) {
58 throw FileError (
"could not write to file", file, errno);
64 Data::write_via_temp (boost::filesystem::path temp, boost::filesystem::path
final)
const
67 boost::filesystem::rename (temp,
final);
72 dcp::operator== (
Data const & a,
Data const & b)
74 return (a.size() == b.size() && memcmp(a.data(), b.data(), a.size()) == 0);
79 dcp::operator!= (
Data const & a,
Data const & b)
81 return (a.size() != b.size() || memcmp(a.data(), b.data(), a.size()) != 0);
An exception related to a file.
Exceptions thrown by libdcp.
Namespace for everything in libdcp.