void writeFileAtomic( StringPiece filename, StringPiece data, mode_t permissions) { writeFileAtomic(filename, ByteRange(data), permissions); }
void writeFileAtomic(StringPiece filename, ByteRange data, mode_t permissions) { iovec iov; iov.iov_base = const_cast<unsigned char*>(data.data()); iov.iov_len = data.size(); writeFileAtomic(filename, &iov, 1, permissions); }