|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
Public Types | |
| enum | Error { NotFound , Forbidden , Misc , Transient , Interrupted } |
Public Member Functions | |
| virtual void | upload (const std::string &uri, std::string data, const Headers &headers={})=0 |
| virtual bool | exists (const std::string &uri, const Headers &headers={})=0 |
| virtual std::pair< FileTransferResult, box_ptr< Source > > | download (const std::string &uri, const Headers &headers={})=0 |
|
pure virtual |
Download a file, returning its contents through a source. Will not return before the transfer has fully started, ensuring that any errors thrown by the setup phase (e.g. HTTP 404 or similar errors) are not postponed to be thrown by the returned source. The source will only throw errors detected during the transfer itself (decompression errors, connection drops, etc).
Implemented in nix::curlFileTransfer.
|
pure virtual |
Checks whether the given URI exists. For historical reasons this function treats HTTP 403 responses like HTTP 404 responses and returns false for both. This was originally done to handle unlistable S3 buckets, which may return 403 (not 404) if the reuqested object doesn't exist in the bucket.
S3 objects are downloaded completely to answer this request.
Implemented in nix::curlFileTransfer.
|
pure virtual |
Upload some data. May throw a FileTransferError exception.
Implemented in nix::curlFileTransfer.