X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/859110cdec2f211beb45305134d095fd8926d552..d1aa91622b3e0f7653889cab205e4c5c622162f4:/apt-pkg/contrib/fileutl.h diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 48bd95537..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; @@ -77,9 +79,16 @@ class FileFd virtual ~FileFd(); }; +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);