summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-04-07 16:38:18 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-04-07 16:38:18 +0200
commit1cd1c398d18b78f4aa9d882a5de5385f4538e0be (patch)
tree98bfc88ce71f799526cdc36075932b8da34a6df7 /apt-pkg/contrib/fileutl.h
parentb3793d41d420a895ef5be4521a56535cc79f0d4a (diff)
* apt-pkg/contrib/fileutl.cc:
- add a parent-guarded "mkdir -p" as CreateDirectory() * apt-pkg/acquire.{cc,h}: - add a delayed constructor with Setup() for success reporting - check for and create directories in Setup if needed instead of error out unfriendly in the Constructor (Closes: #523920, #525783) - optional handle a lock file in Setup() * cmdline/apt-get.cc: - remove the lock file handling and let Acquire take care of it instead
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r--apt-pkg/contrib/fileutl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index 351d53c5e..003bd9b83 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -21,6 +21,7 @@
#ifndef PKGLIB_FILEUTL_H
#define PKGLIB_FILEUTL_H
+#include <apt-pkg/macros.h>
#include <string>
#include <vector>
@@ -82,6 +83,8 @@ 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 &AllowNoExt=false);
std::vector<string> GetListOfFilesInDir(string const &Dir, std::vector<string> const &Ext,