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

Function FSUSER_DeleteFile

libctru/source/services/fs.c:212–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212Result FSUSER_DeleteFile(FS_Archive archive, FS_Path path)
213{
214 u32 *cmdbuf = getThreadCommandBuffer();
215
216 cmdbuf[0] = IPC_MakeHeader(0x804,5,2); // 0x8040142
217 cmdbuf[1] = 0;
218 cmdbuf[2] = (u32) archive;
219 cmdbuf[3] = (u32) (archive >> 32);
220 cmdbuf[4] = path.type;
221 cmdbuf[5] = path.size;
222 cmdbuf[6] = IPC_Desc_StaticBuffer(path.size, 0);
223 cmdbuf[7] = (u32) path.data;
224
225 Result ret = 0;
226 if(R_FAILED(ret = svcSendSyncRequest(fsSessionForArchive(archive)))) return ret;
227
228 return cmdbuf[1];
229}
230
231Result FSUSER_RenameFile(FS_Archive srcArchive, FS_Path srcPath, FS_Archive dstArchive, FS_Path dstPath)
232{

Callers 2

archive_unlinkFunction · 0.85
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