X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4e3180ff00ae32e4d836517180137048ac3cdfc7..e5fefea6ec93746376bf42733ee84a9fafeab764:/apt-pkg/contrib/fileutl.h diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 489cee13a..e04f75e2a 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -193,6 +193,13 @@ pid_t ExecFork(std::set keep_fds); void MergeKeepFdsFromConfiguration(std::set &keep_fds); bool ExecWait(pid_t Pid,const char *Name,bool Reap = false); + +// check if the given file starts with a PGP cleartext signature +bool StartsWithGPGClearTextSignature(std::string const &FileName); + +// process releated +bool DropPrivs(); + // File string manipulators std::string flNotDir(std::string File); std::string flNotFile(std::string File); @@ -200,6 +207,10 @@ std::string flNoLink(std::string File); std::string flExtension(std::string File); 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); + // simple c++ glob std::vector Glob(std::string const &pattern, int flags=0);