MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / unlinkFile

Method unlinkFile

source/kernel/kprocess.cpp:1001–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

999}
1000
1001U32 KProcess::unlinkFile(BString path) {
1002 std::shared_ptr<FsNode> node = Fs::getNodeFromLocalPath(this->currentDirectory, path, false);
1003 if (!node) {
1004 return -K_ENOENT;
1005 }
1006 if (!node->remove()) {
1007 kwarn_fmt("failed to remove file: errno=%d", errno);
1008 return -K_EBUSY;
1009 }
1010 return 0;
1011}
1012
1013U32 KProcess::link(BString from, BString to) {
1014 std::shared_ptr<FsNode> fromNode = Fs::getNodeFromLocalPath(this->currentDirectory, from, false);

Callers 1

syscall_unlinkFunction · 0.80

Calls 2

kwarn_fmtFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected