| 184 | } |
| 185 | |
| 186 | Result FSUSER_OpenFileDirectly(Handle* out, FS_ArchiveID archiveId, FS_Path archivePath, FS_Path filePath, u32 openFlags, u32 attributes) |
| 187 | { |
| 188 | u32 *cmdbuf = getThreadCommandBuffer(); |
| 189 | |
| 190 | cmdbuf[0] = IPC_MakeHeader(0x803,8,4); // 0x8030204 |
| 191 | cmdbuf[1] = 0; |
| 192 | cmdbuf[2] = archiveId; |
| 193 | cmdbuf[3] = archivePath.type; |
| 194 | cmdbuf[4] = archivePath.size; |
| 195 | cmdbuf[5] = filePath.type; |
| 196 | cmdbuf[6] = filePath.size; |
| 197 | cmdbuf[7] = openFlags; |
| 198 | cmdbuf[8] = attributes; |
| 199 | cmdbuf[9] = IPC_Desc_StaticBuffer(archivePath.size, 2); |
| 200 | cmdbuf[10] = (u32) archivePath.data; |
| 201 | cmdbuf[11] = IPC_Desc_StaticBuffer(filePath.size, 0); |
| 202 | cmdbuf[12] = (u32) filePath.data; |
| 203 | |
| 204 | Result ret = 0; |
| 205 | if(R_FAILED(ret = svcSendSyncRequest(fsSession()))) return ret; |
| 206 | |
| 207 | if(out) *out = cmdbuf[3]; |
| 208 | |
| 209 | return cmdbuf[1]; |
| 210 | } |
| 211 | |
| 212 | Result FSUSER_DeleteFile(FS_Archive archive, FS_Path path) |
| 213 | { |
no test coverage detected