MCPcopy Create free account
hub / github.com/apache/brpc / EvictFileFromSystemCache

Function EvictFileFromSystemCache

test/test_file_util_linux.cc:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace butil {
14
15bool EvictFileFromSystemCache(const FilePath& file) {
16 ScopedFD fd(open(file.value().c_str(), O_RDONLY));
17 if (!fd.is_valid())
18 return false;
19 if (fdatasync(fd.get()) != 0)
20 return false;
21 if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0)
22 return false;
23 return true;
24}
25
26} // namespace butil

Callers

nothing calls this directly

Calls 4

c_strMethod · 0.45
valueMethod · 0.45
is_validMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected