| 913 | } |
| 914 | |
| 915 | U32 KProcess::renameat(FD olddirfd, BString from, FD newdirfd, BString to) { |
| 916 | BString currentDirectory; |
| 917 | U32 result = this->getCurrentDirectoryFromDirFD(olddirfd, currentDirectory); |
| 918 | if (result) |
| 919 | return result; |
| 920 | |
| 921 | std::shared_ptr<FsNode> node = Fs::getNodeFromLocalPath(currentDirectory, from, false); |
| 922 | if (!node) |
| 923 | return -K_ENOENT; |
| 924 | result = this->getCurrentDirectoryFromDirFD(newdirfd, currentDirectory); |
| 925 | if (result) |
| 926 | return result; |
| 927 | BString fullPath = Fs::getFullPath(currentDirectory, to); |
| 928 | return node->rename(fullPath); |
| 929 | } |
| 930 | |
| 931 | static S32 internalAccess(std::shared_ptr<FsNode> node, U32 flags) { |
| 932 | if (!node) { |
no test coverage detected