apt  0.9.7.9
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | List of all members
FileFd Class Reference
Collaboration diagram for FileFd:
Collaboration graph
[legend]

Public Types

enum  OpenMode {
  ReadOnly = (1 << 0), WriteOnly = (1 << 1), ReadWrite = ReadOnly | WriteOnly, Create = (1 << 2),
  Exclusive = (1 << 3), Atomic = Exclusive | (1 << 4), Empty = (1 << 5), WriteEmpty = ReadWrite | Create | Empty,
  WriteExists = ReadWrite, WriteAny = ReadWrite | Create, WriteTemp = ReadWrite | Create | Exclusive, ReadOnlyGzip,
  WriteAtomic = ReadWrite | Create | Atomic
}
enum  CompressMode {
  Auto = 'A', None = 'N', Extension = 'E', Gzip = 'G',
  Bzip2 = 'B', Lzma = 'L', Xz = 'X'
}

Public Member Functions

bool Read (void *To, unsigned long long Size, bool AllowEof)
bool Read (void *To, unsigned long long Size, unsigned long long *Actual=0)
char * ReadLine (char *To, unsigned long long const Size)
bool Write (const void *From, unsigned long long Size)
bool Seek (unsigned long long To)
bool Skip (unsigned long long To)
bool Truncate (unsigned long long To)
unsigned long long Tell ()
unsigned long long Size ()
unsigned long long FileSize ()
time_t ModificationTime ()
__deprecated bool Read (void *To, unsigned long long Size, unsigned long *Actual)
bool Open (std::string FileName, unsigned int const Mode, CompressMode Compress, unsigned long const Perms=0666)
bool Open (std::string FileName, unsigned int const Mode, APT::Configuration::Compressor const &compressor, unsigned long const Perms=0666)
bool Open (std::string const &FileName, unsigned int const Mode, unsigned long const Perms=0666)
bool OpenDescriptor (int Fd, unsigned int const Mode, CompressMode Compress, bool AutoClose=false)
bool OpenDescriptor (int Fd, unsigned int const Mode, APT::Configuration::Compressor const &compressor, bool AutoClose=false)
bool OpenDescriptor (int Fd, unsigned int const Mode, bool AutoClose=false)
bool Close ()
bool Sync ()
int Fd ()
void Fd (int fd)
__deprecated gzFile gzFd ()
bool IsOpen ()
bool Failed ()
void EraseOnFailure ()
void OpFail ()
bool Eof ()
bool IsCompressed ()
std::string & Name ()
 FileFd (std::string FileName, unsigned int const Mode, unsigned long Perms=0666)
 FileFd (std::string FileName, unsigned int const Mode, CompressMode Compress, unsigned long Perms=0666)
 FileFd (int const Fd, unsigned int const Mode=ReadWrite, CompressMode Compress=None)
 FileFd (int const Fd, bool const AutoClose)

Static Public Member Functions

static bool Write (int Fd, const void *From, unsigned long long Size)

Protected Types

enum  LocalFlags {
  AutoClose = (1<<0), Fail = (1<<1), DelOnFail = (1<<2), HitEof = (1<<3),
  Replace = (1<<4), Compressed = (1<<5)
}

Protected Attributes

int iFd
unsigned long Flags
std::string FileName
std::string TemporaryFileName

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