Logo Search packages:      
Sourcecode: yapet version File versions  Download package

void File::writeHeader ( const BDBuffer enc_header  )  throw (YAPETException) [protected]

Writes the given encrypted header to the file.

Writes the recognition string at the beginning of the file and eventually the provided header enc_header

enc_header reference to a BDBuffer holding the encrypted header

Definition at line 535 of file file.cc.

References fd, filename, lastModified(), mtime, seekAbs(), and write().


    // Write the recognition string
    ssize_t retval = ::write(fd, RECOG_STR, strlen(RECOG_STR));
    if (retval == -1)
      throw YAPETException(strerror(errno));

    if (((size_t)retval) != strlen(RECOG_STR) )
      throw YAPETException(_("Short write on file: ") + filename);

    mtime = lastModified();


Generated by  Doxygen 1.6.0   Back to index