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

Function FSUSER_CreateDirectory

libctru/source/services/fs.c:316–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316Result FSUSER_CreateDirectory(FS_Archive archive, FS_Path path, u32 attributes)
317{
318 u32 *cmdbuf = getThreadCommandBuffer();
319
320 cmdbuf[0] = IPC_MakeHeader(0x809,6,2); // 0x8090182
321 cmdbuf[1] = 0;
322 cmdbuf[2] = (u32) archive;
323 cmdbuf[3] = (u32) (archive >> 32);
324 cmdbuf[4] = path.type;
325 cmdbuf[5] = path.size;
326 cmdbuf[6] = attributes;
327 cmdbuf[7] = IPC_Desc_StaticBuffer(path.size, 0);
328 cmdbuf[8] = (u32) path.data;
329
330 Result ret = 0;
331 if(R_FAILED(ret = svcSendSyncRequest(fsSessionForArchive(archive)))) return ret;
332
333 return cmdbuf[1];
334}
335
336Result FSUSER_RenameDirectory(FS_Archive srcArchive, FS_Path srcPath, FS_Archive dstArchive, FS_Path dstPath)
337{

Callers 1

archive_mkdirFunction · 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