apt: pkgAcqFile Class Reference

apt 2.9.8 commandline package manager

Public Member Functions | List of all members
pkgAcqFile Class Reference
Acquire system {{{

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

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

Inheritance diagram for pkgAcqFile:

## Public Member Functions
virtual HashStringList | GetExpectedHashes () const APT_OVERRIDE
virtual bool | HashesRequired () const APT_OVERRIDE
virtual void | Done (std::string const &Message, HashStringList const &CalcHashes, pkgAcquire::MethodConfig const *const Cnf) APT_OVERRIDE
virtual std::string | DescURI () const APT_OVERRIDE
virtual std::string | Custom600Headers () const APT_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

  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.

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

- apt-pkg/acquire-item.h
- apt-pkg/acquire-item.cc