libzipper 1.0.1
Public Member Functions
zipper::FileWriter Class Reference

FileWrter is a file-based implementation of the Writer interface. More...

#include <zipper.hh>

Inheritance diagram for zipper::FileWriter:
zipper::Writer

List of all members.

Public Member Functions

 FileWriter (const std::string &filename, mode_t createPermissions=0664, const timeval &modTime=s_now)
 FileWriter (const std::string &filename, int fd, bool closeFd)
virtual ~FileWriter ()
 FileWriter dtor.
virtual zsize_t getSize () const
 Inherited from Writer.
virtual void writeData (zsize_t offset, zsize_t bytes, const uint8_t *data)
 Inherited from Writer.

Detailed Description

FileWrter is a file-based implementation of the Writer interface.

Definition at line 414 of file zipper.hh.


Constructor & Destructor Documentation

zipper::FileWriter::FileWriter ( const std::string &  filename,
mode_t  createPermissions = 0664,
const timeval &  modTime = s_now 
)

Write data to the supplied file. If the file already exists, it will be truncated. If the file does not exist, it will be created with the given permissions.

Parameters:
filenameThe file to open for writing.
createPermissionsThe permissions set on the file if it is to be created.
modTimeSet a specific modification time on the created file. If the special s_now value is provided, the current time will be used.
zipper::FileWriter::FileWriter ( const std::string &  filename,
int  fd,
bool  closeFd 
)

Write data to the supplied file.

Parameters:
filenameThe filename reported in any exception error messages. This name is arbitary, and does not need to be related to fd.
fdThe descriptor to write data to. The descriptor must be open for writing in blocking mode.
closeFdIf true, fd will be closed by this object when it is no longer needed.

The documentation for this class was generated from the following file: