MCPcopy Create free account
hub / github.com/dmlc/xgboost / TryDeleteCacheFile

Function TryDeleteCacheFile

src/data/sparse_page_source.cc:22–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void TryDeleteCacheFile(const std::string& file) {
23 // Don't throw, this is called in a destructor.
24 auto exists = std::filesystem::exists(file);
25 if (!exists) {
26 LOG(WARNING) << "External memory cache file " << file << " is missing.";
27 }
28 if (std::remove(file.c_str()) != 0) {
29 LOG(WARNING) << "Couldn't remove external memory cache file " << file
30 << "; you may want to remove it manually";
31 }
32}
33
34std::string MakeCachePrefix(std::string cache_prefix) {
35 std::string_view constexpr kDftname{"DMatrix"};

Callers 1

DeleteCacheFilesFunction · 0.85

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected