MCPcopy Create free account
hub / github.com/devkitPro/libctru / FSUSER_RenameFile

Function FSUSER_RenameFile

libctru/source/services/fs.c:231–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231Result FSUSER_RenameFile(FS_Archive srcArchive, FS_Path srcPath, FS_Archive dstArchive, FS_Path dstPath)
232{
233 u32 *cmdbuf = getThreadCommandBuffer();
234
235 cmdbuf[0] = IPC_MakeHeader(0x805,9,4); // 0x8050244
236 cmdbuf[1] = 0;
237 cmdbuf[2] = (u32) srcArchive;
238 cmdbuf[3] = (u32) (srcArchive >> 32);
239 cmdbuf[4] = srcPath.type;
240 cmdbuf[5] = srcPath.size;
241 cmdbuf[6] = (u32) dstArchive;
242 cmdbuf[7] = (u32) (dstArchive >> 32);
243 cmdbuf[8] = dstPath.type;
244 cmdbuf[9] = dstPath.size;
245 cmdbuf[10] = IPC_Desc_StaticBuffer(srcPath.size, 1);
246 cmdbuf[11] = (u32) srcPath.data;
247 cmdbuf[12] = IPC_Desc_StaticBuffer(dstPath.size, 2);
248 cmdbuf[13] = (u32) dstPath.data;
249
250 Result ret = 0;
251 if(R_FAILED(ret = svcSendSyncRequest(fsSessionForArchive(srcArchive)))) return ret;
252
253 return cmdbuf[1];
254}
255
256Result FSUSER_DeleteDirectory(FS_Archive archive, FS_Path path)
257{

Callers 1

archive_renameFunction · 0.85

Calls 4

getThreadCommandBufferFunction · 0.85
IPC_MakeHeaderFunction · 0.85
IPC_Desc_StaticBufferFunction · 0.85
fsSessionForArchiveFunction · 0.85

Tested by

no test coverage detected