MCPcopy Create free account
hub / github.com/apple/foundationdb / replaceFile

Method replaceFile

fdbserver/DiskQueue.actor.cpp:314–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312
313#if defined(_WIN32)
314 ACTOR static Future<Reference<IAsyncFile>> replaceFile(Reference<IAsyncFile> toReplace) {
315 // Windows doesn't support a rename over an open file.
316 wait(toReplace->truncate(4 << 10));
317 return toReplace;
318 }
319#else
320 ACTOR static Future<Reference<IAsyncFile>> replaceFile(Reference<IAsyncFile> toReplace) {
321 incrementalTruncate(toReplace);

Callers

nothing calls this directly

Calls 4

openMethod · 0.65
truncateMethod · 0.45
getFilenameMethod · 0.45
syncMethod · 0.45

Tested by

no test coverage detected