libwreport  3.5
Public Member Functions | Protected Attributes
wreport::sys::NamedFileDescriptor Class Reference

File descriptor with a name. More...

#include <sys.h>

Inheritance diagram for wreport::sys::NamedFileDescriptor:
wreport::sys::FileDescriptor wreport::sys::File wreport::sys::Path

Public Member Functions

 NamedFileDescriptor (int fd, const std::string &pathname)
 
 NamedFileDescriptor (NamedFileDescriptor &&)
 
NamedFileDescriptoroperator= (NamedFileDescriptor &&)
 
virtual void throw_error (const char *desc)
 Throw an exception based on errno and the given message. More...
 
const std::string & name () const
 Return the file pathname.
 
- Public Member Functions inherited from wreport::sys::FileDescriptor
 FileDescriptor (FileDescriptor &&o)
 
 FileDescriptor (int fd)
 
void close ()
 
void fstat (struct stat &st)
 
void fchmod (mode_t mode)
 
size_t write (const void *buf, size_t count)
 
void write_all (const void *buf, size_t count)
 Write all the data in buf, retrying partial writes.
 
MMap mmap (size_t length, int prot, int flags, off_t offset=0)
 
 operator int () const
 

Protected Attributes

std::string pathname
 
- Protected Attributes inherited from wreport::sys::FileDescriptor
int fd = -1
 

Detailed Description

File descriptor with a name.

Member Function Documentation

virtual void wreport::sys::NamedFileDescriptor::throw_error ( const char *  desc)
virtual

Throw an exception based on errno and the given message.

This can be overridden by subclasses that may have more information about the file descriptor, so that they can generate more descriptive messages.

Reimplemented from wreport::sys::FileDescriptor.


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