Android-cuttlefish cvd tool
Namespaces | Functions | Variables
url_download.cpp File Reference
#include "cuttlefish/host/libs/web/url_download.h"
#include <fcntl.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/file.h>
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include "absl/log/log.h"
#include "absl/strings/ascii.h"
#include "absl/strings/string_view.h"
#include "absl/strings/strip.h"
#include "fmt/format.h"
#include "cuttlefish/common/libs/fs/fd.h"
#include "cuttlefish/files/directory_contents.h"
#include "cuttlefish/files/file_exists.h"
#include "cuttlefish/host/libs/web/digest.h"
#include "cuttlefish/host/libs/web/http_client/http_client.h"
#include "cuttlefish/host/libs/web/http_client/http_file.h"
#include "cuttlefish/host/libs/web/http_client/scrub_secrets.h"
#include "cuttlefish/host/libs/zip/libzip_cc/seekable_source.h"
#include "cuttlefish/host/libs/zip/libzip_cc/seeking_source_reader.h"
#include "cuttlefish/host/libs/zip/remote_zip.h"
#include "cuttlefish/io/write_exact.h"
#include "cuttlefish/posix/remove.h"
#include "cuttlefish/posix/rename.h"
#include "cuttlefish/posix/stat.h"
#include "cuttlefish/result/result.h"
Include dependency graph for url_download.cpp:

Namespaces

namespace  cuttlefish
 
namespace  cuttlefish::anonymous_namespace{url_download.cpp}
 

Functions

Result< void > cuttlefish::anonymous_namespace{url_download.cpp}::FullDownload (HttpClient &http_client, const UrlDownload &download, const std::string &path)
 
Result< void > cuttlefish::anonymous_namespace{url_download.cpp}::ResumeDownload (HttpClient &http_client, const UrlDownload &download, Fd &part, const std::string &part_path, const std::string &path)
 
Result< void > cuttlefish::anonymous_namespace{url_download.cpp}::RemoveOtherPartialFiles (const std::string &path)
 
std::string cuttlefish::PartialFilePath (const std::string &path, absl::string_view version)
 
Result< bool > cuttlefish::HoldsFileAt (Fd &fd, const std::string &path)
 
Result< void > cuttlefish::DownloadUrlToFile (HttpClient &http_client, const UrlDownload &download, const std::string &path)
 

Variables

constexpr int cuttlefish::anonymous_namespace{url_download.cpp}::kLockAttempts = 4
 
constexpr uint64_t cuttlefish::anonymous_namespace{url_download.cpp}::kReadSize = 64 << 20
 
constexpr size_t cuttlefish::anonymous_namespace{url_download.cpp}::kVersionHashLength = 16