]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/fileutl.h
Use _error->Warning() instead of writing to std::cerr.
[apt.git] / apt-pkg / contrib / fileutl.h
index 3cbf67fbbacf0a28a49201e4e7c2a7fb13a33e55..003bd9b83f499ab41592f60373d48be9d217b316 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef PKGLIB_FILEUTL_H
 #define PKGLIB_FILEUTL_H
 
+#include <apt-pkg/macros.h>
 
 #include <string>
 #include <vector>
@@ -82,8 +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<string> GetListOfFilesInDir(string const &Dir, string const &Ext,
-                               bool const &SortList);
+                                       bool const &SortList, bool const &AllowNoExt=false);
+std::vector<string> GetListOfFilesInDir(string const &Dir, std::vector<string> const &Ext,
+                                       bool const &SortList);
 string SafeGetCWD();
 void SetCloseExec(int Fd,bool Close);
 void SetNonBlock(int Fd,bool Block);