X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4e92b11649292714082754920d5b28477414cd5a..f8e8a14f17cb41c588970fc57bb41fcf6058a703:/apt-pkg/contrib/fileutl.h diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index f33f7804b..15665f8b5 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -86,6 +86,7 @@ class FileFd return Read(To,Size); } bool Read(void *To,unsigned long long Size,unsigned long long *Actual = 0); + bool static Read(int const Fd, void *To, unsigned long long Size, unsigned long long * const Actual = 0); char* ReadLine(char *To, unsigned long long const Size); bool Flush(); bool Write(const void *From,unsigned long long Size); @@ -163,7 +164,7 @@ 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); -bool DirectoryExists(std::string const &Path) APT_CONST; +bool DirectoryExists(std::string const &Path); bool CreateDirectory(std::string const &Parent, std::string const &Path); time_t GetModificationTime(std::string const &Path); bool Rename(std::string From, std::string To); @@ -234,6 +235,8 @@ std::string flCombine(std::string Dir,std::string File); /** \brief Takes a file path and returns the absolute path */ std::string flAbsPath(std::string File); +/** \brief removes superfluous /./ and // from path */ +APT_HIDDEN std::string flNormalize(std::string file); // simple c++ glob std::vector Glob(std::string const &pattern, int flags=0);