| #pragma once |
|
|
| #include <string> |
| #include <vector> |
|
|
| |
|
|
| namespace hf_cache { |
|
|
| struct hf_file { |
| std::string path; |
| std::string url; |
| std::string local_path; |
| std::string final_path; |
| std::string oid; |
| std::string repo_id; |
| size_t size = 0; |
| }; |
|
|
| using hf_files = std::vector<hf_file>; |
|
|
| |
| hf_files get_repo_files( |
| const std::string & repo_id, |
| const std::string & token |
| ); |
|
|
| hf_files get_cached_files(const std::string & repo_id = {}); |
|
|
| |
| std::string finalize_file(const hf_file & file); |
|
|
| |
| void migrate_old_cache_to_hf_cache(const std::string & token, bool offline = false); |
|
|
| } |
|
|