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

Method renameat

source/kernel/kprocess.cpp:915–929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

913}
914
915U32 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
931static S32 internalAccess(std::shared_ptr<FsNode> node, U32 flags) {
932 if (!node) {

Callers 1

syscall_renameatFunction · 0.80

Calls 2

renameMethod · 0.45

Tested by

no test coverage detected