MCPcopy Create free account
hub / github.com/ByConity/ByConity / removeFileIfExists

Method removeFileIfExists

src/Disks/DiskLocal.cpp:291–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void DiskLocal::removeFileIfExists(const String & path)
292{
293 auto fs_path = fs::path(disk_path) / path;
294 if (0 != unlink(fs_path.c_str()) && errno != ENOENT)
295 throwFromErrnoWithPath("Cannot unlink file " + fs_path.string(), fs_path, ErrorCodes::CANNOT_UNLINK);
296}
297
298void DiskLocal::removeDirectory(const String & path)
299{

Callers 15

mutateMethod · 0.45
fetchExistsPartMethod · 0.45
writeSegmentMethod · 0.45
iterateFileMethod · 0.45
dropIfEmptyMethod · 0.45
clonePartMethod · 0.45
makeCloneInDetachedMethod · 0.45
makeCloneOnDiskMethod · 0.45
commitMethod · 0.45

Calls 2

throwFromErrnoWithPathFunction · 0.85
stringMethod · 0.45

Tested by

no test coverage detected