|
apt 3.0.3
commandline package manager
|
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 | ReadLine (std::string &To) |
| bool | Flush () |
| 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 () |
| bool | Open (std::string FileName, unsigned int const Mode, CompressMode Compress, unsigned long const AccessMode=0666) |
| bool | Open (std::string FileName, unsigned int const Mode, APT::Configuration::Compressor const &compressor, unsigned long const AccessMode=0666) |
| bool | Open (std::string FileName, unsigned int const Mode, unsigned long const AccessMode=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) |
| bool | IsOpen () |
| bool | Failed () |
| void | EraseOnFailure () |
| void | OpFail () |
| bool | Eof () |
| bool | IsCompressed () |
| std::string & | Name () |
| void | SetFileName (std::string const &name) |
| FileFd (std::string FileName, unsigned int const Mode, unsigned long AccessMode=0666) | |
| FileFd (std::string FileName, unsigned int const Mode, CompressMode Compress, unsigned long AccessMode=0666) | |
| FileFd (int const Fd, unsigned int const Mode=ReadWrite, CompressMode Compress=None) | |
| FileFd (int const Fd, bool const AutoClose) | |
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 |
Friends | |
| class | FileFdPrivate |
| class | GzipFileFdPrivate |
| class | Bz2FileFdPrivate |
| class | LzmaFileFdPrivate |
| class | Lz4FileFdPrivate |
| class | ZstdFileFdPrivate |
| class | DirectFileFdPrivate |
| class | PipedFileFdPrivate |
| char * ReadLine | ( | char * | To, |
| unsigned long long const | Size | ||
| ) |
read a complete line or until buffer is full
The buffer will always be \0 terminated, so at most Size-1 characters are read. If the buffer holds a complete line the last character (before \0) will be the newline character \n otherwise the line was longer than the buffer.
| To | buffer which will hold the line |
| Size | of the buffer to fill |
b nullptr is returned in error cases, otherwise the parameter To now filled with the line.
Referenced by pkgAcqChangelog::URI().
| bool ReadLine | ( | std::string & | To | ) |
read a complete line from the file
Similar to std::getline() the string does not include the newline, but just the content of the line as the newline is not needed to distinguish cases as for the other ReadLine method.
| To | string which will hold the line |