| 891 | } |
| 892 | |
| 893 | U32 KProcess::mkdir(BString path) { |
| 894 | std::shared_ptr<FsNode> node = Fs::getNodeFromLocalPath(this->currentDirectory, path, false); |
| 895 | if (node) { |
| 896 | return -K_EEXIST; |
| 897 | } |
| 898 | BString fullpath = Fs::getFullPath(this->currentDirectory, path); |
| 899 | BString parentPath = Fs::getParentPath(fullpath); |
| 900 | node = Fs::getNodeFromLocalPath(B(""), parentPath, false); |
| 901 | if (!node) { |
| 902 | return -K_ENOENT; |
| 903 | } |
| 904 | return Fs::makeLocalDirs(fullpath); |
| 905 | } |
| 906 | |
| 907 | U32 KProcess::rename(BString from, BString to) { |
| 908 | std::shared_ptr<FsNode> node = Fs::getNodeFromLocalPath(this->currentDirectory, from, false); |
no test coverage detected