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

Function FSUSER_OpenDirectory

libctru/source/services/fs.c:361–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361Result FSUSER_OpenDirectory(Handle* out, FS_Archive archive, FS_Path path)
362{
363 u32 *cmdbuf = getThreadCommandBuffer();
364
365 cmdbuf[0] = IPC_MakeHeader(0x80B,4,2); // 0x80B0102
366 cmdbuf[1] = (u32) archive;
367 cmdbuf[2] = (u32) (archive >> 32);
368 cmdbuf[3] = path.type;
369 cmdbuf[4] = path.size;
370 cmdbuf[5] = IPC_Desc_StaticBuffer(path.size, 0);
371 cmdbuf[6] = (u32) path.data;
372
373 Result ret = 0;
374 if(R_FAILED(ret = svcSendSyncRequest(fsSessionForArchive(archive)))) return ret;
375
376 if(out) *out = cmdbuf[3];
377
378 return cmdbuf[1];
379}
380
381Result FSUSER_OpenArchive(FS_Archive* archive, FS_ArchiveID id, FS_Path path)
382{

Callers 3

archive_statFunction · 0.85
archive_chdirFunction · 0.85
archive_diropenFunction · 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