diff options
Diffstat (limited to 'src/libfetchers/fetchers.hh')
-rw-r--r-- | src/libfetchers/fetchers.hh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libfetchers/fetchers.hh b/src/libfetchers/fetchers.hh index c6b219c02..c43b047a7 100644 --- a/src/libfetchers/fetchers.hh +++ b/src/libfetchers/fetchers.hh @@ -38,6 +38,9 @@ struct Input bool immutable = false; bool direct = true; + /* path of the parent of this input, used for relative path resolution */ + std::optional<Path> parent; + public: static Input fromURL(const std::string & url); @@ -81,6 +84,8 @@ public: std::string_view file, std::optional<std::string> commitMsg) const; + std::string getName() const; + StorePath computeStorePath(Store & store) const; // Convenience functions for common attributes. @@ -145,13 +150,7 @@ DownloadFileResult downloadFile( bool immutable, const Headers & headers = {}); -struct DownloadTarballMeta -{ - time_t lastModified; - std::string effectiveUrl; -}; - -std::pair<Tree, DownloadTarballMeta> downloadTarball( +std::pair<Tree, time_t> downloadTarball( ref<Store> store, const std::string & url, const std::string & name, |