+ /** Deletes each entry in the given directory that is not being
+ * downloaded by this object. For instance, when downloading new
+ * list files, calling Clean() will delete the old ones.
+ *
+ * \param Dir The directory to be cleaned out.
+ *
+ * \return \b true if the directory exists and is readable.
+ */
+ bool Clean(string Dir);
+
+ /** \return the total size in bytes of all the items included in
+ * this download.
+ */
+ unsigned long long TotalNeeded();
+
+ /** \return the size in bytes of all non-local items included in
+ * this download.
+ */
+ unsigned long long FetchNeeded();
+
+ /** \return the amount of data to be fetched that is already
+ * present on the filesystem.
+ */
+ unsigned long long PartialPresent();
+
+ /** \brief Delayed constructor
+ *
+ * \param Progress indicator associated with this download or
+ * \b NULL for none. This object is not owned by the
+ * download process and will not be deleted when the pkgAcquire
+ * object is destroyed. Naturally, it should live for at least as
+ * long as the pkgAcquire object does.
+ * \param Lock defines a lock file that should be acquired to ensure
+ * only one Acquire class is in action at the time or an empty string
+ * if no lock file should be used.
+ */
+ bool Setup(pkgAcquireStatus *Progress = NULL, string const &Lock = "");
+
+ /** \brief Construct a new pkgAcquire. */
+ pkgAcquire(pkgAcquireStatus *Log) __deprecated;
+ pkgAcquire();
+
+ /** \brief Destroy this pkgAcquire object.
+ *
+ * Destroys all queue, method, and item objects associated with
+ * this download.
+ */
+ virtual ~pkgAcquire();
+
+ private:
+ /** \brief FD of the Lock file we acquire in Setup (if any) */
+ int LockFD;
+
+ /** \brief Ensure the existence of the given Path
+ *
+ * \param Parent directory of the Path directory - a trailing
+ * /apt/ will be removed before CreateDirectory call.
+ * \param Path which should exist after (successful) call
+ */
+ bool CheckDirectory(string const &Parent, string const &Path) const;