| 999 | } |
| 1000 | |
| 1001 | U32 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 | |
| 1013 | U32 KProcess::link(BString from, BString to) { |
| 1014 | std::shared_ptr<FsNode> fromNode = Fs::getNodeFromLocalPath(this->currentDirectory, from, false); |
no test coverage detected