|
apt 3.0.3
commandline package manager
|
Retrieve an arbitrary file to the current directory. {{{. More...
#include <apt-pkg/acquire-item.h>
Public Member Functions | |
| HashStringList | GetExpectedHashes () const override |
| bool | HashesRequired () const override |
| void | Done (std::string const &Message, HashStringList const &CalcHashes, pkgAcquire::MethodConfig const *Cnf) override |
| std::string | DescURI () const override |
| std::string | Custom600Headers () const override |
| pkgAcqFile (pkgAcquire *const Owner, std::string const &URI, HashStringList const &Hashes, unsigned long long const Size, std::string const &Desc, std::string const &ShortDesc, std::string const &DestDir="", std::string const &DestFilename="", bool const IsIndexFile=false) | |
| Create a new pkgAcqFile object. | |
Retrieve an arbitrary file to the current directory. {{{.
The file is retrieved even if it is accessed via a URL type that normally is a NOP, such as "file". If the download fails, the partial file is renamed to get a ".FAILED" extension.
| pkgAcqFile | ( | pkgAcquire *const | Owner, |
| std::string const & | URI, | ||
| HashStringList const & | Hashes, | ||
| unsigned long long const | Size, | ||
| std::string const & | Desc, | ||
| std::string const & | ShortDesc, | ||
| std::string const & | DestDir = "", |
||
| std::string const & | DestFilename = "", |
||
| bool const | IsIndexFile = false |
||
| ) |
Create a new pkgAcqFile object.
| Owner | The pkgAcquire object with which this object is associated. |
| URI | The URI to download. |
| Hashes | The hashsums of the file to download, if they are known; otherwise empty list. |
| Size | The size of the file to download, if it is known; otherwise 0. |
| Desc | A description of the file being downloaded. |
| ShortDesc | A brief description of the file being downloaded. |
| DestDir | The directory the file should be downloaded into. |
| DestFilename | The filename+path the file is downloaded to. |
| IsIndexFile | The file is considered a IndexFile and cache-control headers like "cache-control: max-age=0" are send |
If DestFilename is empty, download to DestDir/<basename> if DestDir is non-empty, $CWD/<basename> otherwise. If DestFilename is NOT empty, DestDir is ignored and DestFilename is the absolute name to which the file should be downloaded.