X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/fa321bf3dbf363879cfc799b6c1cc4e5af50ffd8..4213f040ac8464d8826b64746c49c21c53a1ab12:/apt-pkg/contrib/fileutl.h?ds=inline diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 73b5ea3be..003bd9b83 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -21,8 +21,10 @@ #ifndef PKGLIB_FILEUTL_H #define PKGLIB_FILEUTL_H +#include #include +#include using std::string; @@ -81,6 +83,12 @@ bool RunScripts(const char *Cnf); bool CopyFile(FileFd &From,FileFd &To); int GetLock(string File,bool Errors = true); bool FileExists(string File); +bool DirectoryExists(string const &Path) __attrib_const; +bool CreateDirectory(string const &Parent, string const &Path); +std::vector GetListOfFilesInDir(string const &Dir, string const &Ext, + bool const &SortList, bool const &AllowNoExt=false); +std::vector GetListOfFilesInDir(string const &Dir, std::vector const &Ext, + bool const &SortList); string SafeGetCWD(); void SetCloseExec(int Fd,bool Close); void SetNonBlock(int Fd,bool Block);