class FileFdPrivate;
class FileFd
{
+ friend class FileFdPrivate;
+ friend class GzipFileFdPrivate;
+ friend class Bz2FileFdPrivate;
+ friend class LzmaFileFdPrivate;
+ friend class DirectFileFdPrivate;
+ friend class PipedFileFdPrivate;
protected:
int iFd;
to be able to support large files (>2 or >4 GB) properly.
This shouldn't happen all to often for the indexes, but deb's might be…
And as the auto-conversation converts a 'unsigned long *' to a 'bool'
- instead of 'unsigned long long *' we need to provide this explicitely -
+ instead of 'unsigned long long *' we need to provide this explicitly -
otherwise applications magically start to fail… */
- bool Read(void *To,unsigned long long Size,unsigned long *Actual) APT_DEPRECATED
+ bool Read(void *To,unsigned long long Size,unsigned long *Actual) APT_DEPRECATED_MSG("The Actual variable you pass in should be an unsigned long long")
{
unsigned long long R;
bool const T = Read(To, Size, &R);
// Simple manipulators
inline int Fd() {return iFd;};
inline void Fd(int fd) { OpenDescriptor(fd, ReadWrite);};
- gzFile gzFd() APT_DEPRECATED APT_PURE;
+ gzFile gzFd() APT_DEPRECATED_MSG("Implementation detail, do not use to be able to support bzip2, xz and co") APT_PURE;
inline bool IsOpen() {return iFd >= 0;};
inline bool Failed() {return (Flags & Fail) == Fail;};
bool RunScripts(const char *Cnf);
bool CopyFile(FileFd &From,FileFd &To);
+bool RemoveFile(char const * const Function, std::string const &FileName);
int GetLock(std::string File,bool Errors = true);
bool FileExists(std::string File);
bool RealFileExists(std::string File);