apt 3.0.3
commandline package manager
Public Member Functions | List of all members
pkgAcqFile Class Reference

Retrieve an arbitrary file to the current directory. {{{. More...

#include <apt-pkg/acquire-item.h>

Inheritance diagram for pkgAcqFile:
[legend]
Collaboration diagram for pkgAcqFile:
[legend]

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ pkgAcqFile()

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.

Parameters
OwnerThe pkgAcquire object with which this object is associated.
URIThe URI to download.
HashesThe hashsums of the file to download, if they are known; otherwise empty list.
SizeThe size of the file to download, if it is known; otherwise 0.
DescA description of the file being downloaded.
ShortDescA brief description of the file being downloaded.
DestDirThe directory the file should be downloaded into.
DestFilenameThe filename+path the file is downloaded to.
IsIndexFileThe 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.


The documentation for this class was generated from the following files: