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

Method mkdir

source/kernel/kprocess.cpp:893–905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

891}
892
893U32 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
907U32 KProcess::rename(BString from, BString to) {
908 std::shared_ptr<FsNode> node = Fs::getNodeFromLocalPath(this->currentDirectory, from, false);

Callers 4

mkdiratMethod · 0.95
runTestMethod · 0.80
initBrowserFilesystemFunction · 0.80
syscall_mkdirFunction · 0.80

Calls 1

BFunction · 0.85

Tested by

no test coverage detected