From 82718c4a77e7143ece9fe91e46e9b04b696a7889 Mon Sep 17 00:00:00 2001 From: TravisCI-DocBuilder Date: Thu, 19 Nov 2015 10:36:04 +0000 Subject: [PATCH] Doc generated from commit 3fbea733c6abc0e0c24b0796a5c52b146aea9d3f --- fs_8h_source.html | 1478 +++++++++++++++++++++++---------------------- 1 file changed, 746 insertions(+), 732 deletions(-) diff --git a/fs_8h_source.html b/fs_8h_source.html index 4f68804..44a0385 100644 --- a/fs_8h_source.html +++ b/fs_8h_source.html @@ -331,803 +331,817 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
239 void fsExit(void);
240 
241 /**
-
242  * Creates an FS_Path instance.
-
243  * @param type Type of path.
-
244  * @param path Path to use.
-
245  * @return The created FS_Path instance.
-
246  */
-
247 FS_Path fsMakePath(FS_PathType type, const void* path);
-
248 
-
249 /**
-
250  * @brief Gets the current FS session handle.
-
251  * @return The current FS session handle.
-
252  */
-
253 Handle* fsGetSessionHandle(void);
-
254 
-
255 /**
-
256  * @brief Performs a control operation on the filesystem.
-
257  * @param action Action to perform.
-
258  * @param input Buffer to read input from.
-
259  * @param inputSize Size of the input.
-
260  * @param output Buffer to write output to.
-
261  * @param outputSize Size of the output.
+
242  * @brief Sets the FSUSER session to use in the current thread.
+
243  * @param session The handle of the FSUSER session to use.
+
244  * @param sdmc When true, SDMC archive commands are redirected to this session too. Otherwise the default session is used.
+
245  */
+
246 void fsUseSession(Handle session, bool sdmc);
+
247 
+
248 /// Disables the FSUSER session override in the current thread.
+
249 void fsEndUseSession(void);
+
250 
+
251 /**
+
252  * @brief Creates an FS_Path instance.
+
253  * @param type Type of path.
+
254  * @param path Path to use.
+
255  * @return The created FS_Path instance.
+
256  */
+
257 FS_Path fsMakePath(FS_PathType type, const void* path);
+
258 
+
259 /**
+
260  * @brief Gets the current FS session handle.
+
261  * @return The current FS session handle.
262  */
-
263 Result FSUSER_Control(FS_Action action, void* input, u32 inputSize, void* output, u32 outputSize);
+
263 Handle* fsGetSessionHandle(void);
264 
-
265 /// Initializes the FSUSER session.
-
266 Result FSUSER_Initialize(void);
-
267 
-
268 /**
-
269  * @brief Opens a file.
-
270  * @param out Pointer to output the file handle to.
-
271  * @param archive Archive containing the file.
-
272  * @param path Path of the file.
-
273  * @param openFlags Flags to open the file with.
-
274  * @param attributes Attributes of the file.
-
275  */
-
276 Result FSUSER_OpenFile(Handle* out, FS_Archive archive, FS_Path path, u32 openFlags, u32 attributes);
-
277 
-
278 /**
-
279  * @brief Opens a file directly.
-
280  * @param out Pointer to output the file handle to.
-
281  * @param archive Archive containing the file.
-
282  * @param path Path of the file.
-
283  * @param openFlags Flags to open the file with.
-
284  * @param attributes Attributes of the file.
-
285  */
-
286 Result FSUSER_OpenFileDirectly(Handle* out, FS_Archive archive, FS_Path path, u32 openFlags, u32 attributes);
-
287 
-
288 /**
-
289  * @brief Deletes a file.
-
290  * @param archive Archive containing the file.
-
291  * @param path Path of the file.
-
292  */
-
293 Result FSUSER_DeleteFile(FS_Archive archive, FS_Path path);
-
294 
-
295 /**
-
296  * @brief Renames a file.
-
297  * @param srcArchive Archive containing the source file.
-
298  * @param srcPath Path of the source file.
-
299  * @param dstArchive Archive containing the destination file.
-
300  * @param dstPath Path of the destination file.
-
301  */
-
302 Result FSUSER_RenameFile(FS_Archive srcArchive, FS_Path srcPath, FS_Archive dstArchive, FS_Path dstPath);
-
303 
-
304 /**
-
305  * @brief Deletes a directory, failing if it is not empty.
-
306  * @param archive Archive containing the directory.
-
307  * @param path Path of the directory.
-
308  */
-
309 Result FSUSER_DeleteDirectory(FS_Archive archive, FS_Path path);
-
310 
-
311 /**
-
312  * @brief Deletes a directory, also deleting its contents.
-
313  * @param archive Archive containing the directory.
-
314  * @param path Path of the directory.
-
315  */
-
316 Result FSUSER_DeleteDirectoryRecursively(FS_Archive archive, FS_Path path);
-
317 
-
318 /**
-
319  * @brief Creates a file.
-
320  * @param archive Archive containing the file.
-
321  * @param path Path of the file.
-
322  * @param attributes Attributes of the file.
-
323  * @param fileSize Size of the file.
-
324  */
-
325 Result FSUSER_CreateFile(FS_Archive archive, FS_Path path, u32 attributes, u64 fileSize);
-
326 
-
327 /**
-
328  * @brief Creates a directory
-
329  * @param archive Archive containing the directory.
-
330  * @param path Path of the directory.
-
331  * @param attributes Attributes of the directory.
-
332  */
-
333 Result FSUSER_CreateDirectory(FS_Archive archive, FS_Path path, u32 attributes);
-
334 
-
335 /**
-
336  * @brief Renames a directory.
-
337  * @param srcArchive Archive containing the source directory.
-
338  * @param srcPath Path of the source directory.
-
339  * @param dstArchive Archive containing the destination directory.
-
340  * @param dstPath Path of the destination directory.
-
341  */
-
342 Result FSUSER_RenameDirectory(FS_Archive srcArchive, FS_Path srcPath, FS_Archive dstArchive, FS_Path dstPath);
-
343 
-
344 /**
-
345  * @brief Opens a directory.
-
346  * @param out Pointer to output the directory handle to.
-
347  * @param archive Archive containing the directory.
-
348  * @param path Path of the directory.
-
349  */
-
350 Result FSUSER_OpenDirectory(Handle *out, FS_Archive archive, FS_Path path);
-
351 
-
352 /**
-
353  * @brief Opens an archive.
-
354  * @param archive Archive to open.
-
355  */
-
356 Result FSUSER_OpenArchive(FS_Archive* archive);
-
357 
-
358 /**
-
359  * @brief Performs a control operation on an archive.
-
360  * @param archive Archive to control.
-
361  * @param action Action to perform.
-
362  * @param input Buffer to read input from.
-
363  * @param inputSize Size of the input.
-
364  * @param output Buffer to write output to.
-
365  * @param outputSize Size of the output.
-
366  */
-
367 Result FSUSER_ControlArchive(FS_Archive archive, FS_ArchiveAction action, void* input, u32 inputSize, void* output, u32 outputSize);
-
368 
-
369 /**
-
370  * @brief Closes an archive.
-
371  * @param archive Archive to close.
-
372  */
-
373 Result FSUSER_CloseArchive(FS_Archive* archive);
-
374 
-
375 /**
-
376  * @brief Gets the number of free bytes within an archive.
-
377  * @param freeBytes Pointer to output the free bytes to.
-
378  * @param archive Archive to check.
+
265 /**
+
266  * @brief Performs a control operation on the filesystem.
+
267  * @param action Action to perform.
+
268  * @param input Buffer to read input from.
+
269  * @param inputSize Size of the input.
+
270  * @param output Buffer to write output to.
+
271  * @param outputSize Size of the output.
+
272  */
+
273 Result FSUSER_Control(FS_Action action, void* input, u32 inputSize, void* output, u32 outputSize);
+
274 
+
275 /**
+
276  * @brief Initializes a FSUSER session.
+
277  * @param session The handle of the FSUSER session to initialize.
+
278  */
+
279 Result FSUSER_Initialize(Handle session);
+
280 
+
281 /**
+
282  * @brief Opens a file.
+
283  * @param out Pointer to output the file handle to.
+
284  * @param archive Archive containing the file.
+
285  * @param path Path of the file.
+
286  * @param openFlags Flags to open the file with.
+
287  * @param attributes Attributes of the file.
+
288  */
+
289 Result FSUSER_OpenFile(Handle* out, FS_Archive archive, FS_Path path, u32 openFlags, u32 attributes);
+
290 
+
291 /**
+
292  * @brief Opens a file directly.
+
293  * @param out Pointer to output the file handle to.
+
294  * @param archive Archive containing the file.
+
295  * @param path Path of the file.
+
296  * @param openFlags Flags to open the file with.
+
297  * @param attributes Attributes of the file.
+
298  */
+
299 Result FSUSER_OpenFileDirectly(Handle* out, FS_Archive archive, FS_Path path, u32 openFlags, u32 attributes);
+
300 
+
301 /**
+
302  * @brief Deletes a file.
+
303  * @param archive Archive containing the file.
+
304  * @param path Path of the file.
+
305  */
+
306 Result FSUSER_DeleteFile(FS_Archive archive, FS_Path path);
+
307 
+
308 /**
+
309  * @brief Renames a file.
+
310  * @param srcArchive Archive containing the source file.
+
311  * @param srcPath Path of the source file.
+
312  * @param dstArchive Archive containing the destination file.
+
313  * @param dstPath Path of the destination file.
+
314  */
+
315 Result FSUSER_RenameFile(FS_Archive srcArchive, FS_Path srcPath, FS_Archive dstArchive, FS_Path dstPath);
+
316 
+
317 /**
+
318  * @brief Deletes a directory, failing if it is not empty.
+
319  * @param archive Archive containing the directory.
+
320  * @param path Path of the directory.
+
321  */
+
322 Result FSUSER_DeleteDirectory(FS_Archive archive, FS_Path path);
+
323 
+
324 /**
+
325  * @brief Deletes a directory, also deleting its contents.
+
326  * @param archive Archive containing the directory.
+
327  * @param path Path of the directory.
+
328  */
+
329 Result FSUSER_DeleteDirectoryRecursively(FS_Archive archive, FS_Path path);
+
330 
+
331 /**
+
332  * @brief Creates a file.
+
333  * @param archive Archive containing the file.
+
334  * @param path Path of the file.
+
335  * @param attributes Attributes of the file.
+
336  * @param fileSize Size of the file.
+
337  */
+
338 Result FSUSER_CreateFile(FS_Archive archive, FS_Path path, u32 attributes, u64 fileSize);
+
339 
+
340 /**
+
341  * @brief Creates a directory
+
342  * @param archive Archive containing the directory.
+
343  * @param path Path of the directory.
+
344  * @param attributes Attributes of the directory.
+
345  */
+
346 Result FSUSER_CreateDirectory(FS_Archive archive, FS_Path path, u32 attributes);
+
347 
+
348 /**
+
349  * @brief Renames a directory.
+
350  * @param srcArchive Archive containing the source directory.
+
351  * @param srcPath Path of the source directory.
+
352  * @param dstArchive Archive containing the destination directory.
+
353  * @param dstPath Path of the destination directory.
+
354  */
+
355 Result FSUSER_RenameDirectory(FS_Archive srcArchive, FS_Path srcPath, FS_Archive dstArchive, FS_Path dstPath);
+
356 
+
357 /**
+
358  * @brief Opens a directory.
+
359  * @param out Pointer to output the directory handle to.
+
360  * @param archive Archive containing the directory.
+
361  * @param path Path of the directory.
+
362  */
+
363 Result FSUSER_OpenDirectory(Handle *out, FS_Archive archive, FS_Path path);
+
364 
+
365 /**
+
366  * @brief Opens an archive.
+
367  * @param archive Archive to open.
+
368  */
+
369 Result FSUSER_OpenArchive(FS_Archive* archive);
+
370 
+
371 /**
+
372  * @brief Performs a control operation on an archive.
+
373  * @param archive Archive to control.
+
374  * @param action Action to perform.
+
375  * @param input Buffer to read input from.
+
376  * @param inputSize Size of the input.
+
377  * @param output Buffer to write output to.
+
378  * @param outputSize Size of the output.
379  */
-
380 Result FSUSER_GetFreeBytes(u64* freeBytes, FS_Archive archive);
+
380 Result FSUSER_ControlArchive(FS_Archive archive, FS_ArchiveAction action, void* input, u32 inputSize, void* output, u32 outputSize);
381 
382 /**
-
383  * @brief Gets the inserted card type.
-
384  * @param type Pointer to output the card type to.
+
383  * @brief Closes an archive.
+
384  * @param archive Archive to close.
385  */
-
386 Result FSUSER_GetCardType(FS_CardType* type);
+
386 Result FSUSER_CloseArchive(FS_Archive* archive);
387 
388 /**
-
389  * @brief Gets the SDMC archive resource information.
-
390  * @param archiveResource Pointer to output the archive resource information to.
-
391  */
-
392 Result FSUSER_GetSdmcArchiveResource(FS_ArchiveResource* archiveResource);
-
393 
-
394 /**
-
395  * @brief Gets the NAND archive resource information.
-
396  * @param archiveResource Pointer to output the archive resource information to.
-
397  */
-
398 Result FSUSER_GetNandArchiveResource(FS_ArchiveResource* archiveResource);
-
399 
-
400 /**
-
401  * @brief Gets the last SDMC fatfs error.
-
402  * @param error Pointer to output the error to.
-
403  */
-
404 Result FSUSER_GetSdmcFatfsError(u32* error);
-
405 
-
406 /**
-
407  * @brief Gets whether an SD card is detected.
-
408  * @param detected Pointer to output the detection status to.
-
409  */
-
410 Result FSUSER_IsSdmcDetected(bool *detected);
-
411 
-
412 /**
-
413  * @brief Gets whether the SD card is writable.
-
414  * @param detected Pointer to output the writable status to.
-
415  */
-
416 Result FSUSER_IsSdmcWritable(bool *writable);
-
417 
-
418 /**
-
419  * @brief Gets the SDMC CID.
-
420  * @param out Pointer to output the CID to.
-
421  * @param length Length of the CID buffer. (should be 0x10)
+
389  * @brief Gets the number of free bytes within an archive.
+
390  * @param freeBytes Pointer to output the free bytes to.
+
391  * @param archive Archive to check.
+
392  */
+
393 Result FSUSER_GetFreeBytes(u64* freeBytes, FS_Archive archive);
+
394 
+
395 /**
+
396  * @brief Gets the inserted card type.
+
397  * @param type Pointer to output the card type to.
+
398  */
+
399 Result FSUSER_GetCardType(FS_CardType* type);
+
400 
+
401 /**
+
402  * @brief Gets the SDMC archive resource information.
+
403  * @param archiveResource Pointer to output the archive resource information to.
+
404  */
+
405 Result FSUSER_GetSdmcArchiveResource(FS_ArchiveResource* archiveResource);
+
406 
+
407 /**
+
408  * @brief Gets the NAND archive resource information.
+
409  * @param archiveResource Pointer to output the archive resource information to.
+
410  */
+
411 Result FSUSER_GetNandArchiveResource(FS_ArchiveResource* archiveResource);
+
412 
+
413 /**
+
414  * @brief Gets the last SDMC fatfs error.
+
415  * @param error Pointer to output the error to.
+
416  */
+
417 Result FSUSER_GetSdmcFatfsError(u32* error);
+
418 
+
419 /**
+
420  * @brief Gets whether an SD card is detected.
+
421  * @param detected Pointer to output the detection status to.
422  */
-
423 Result FSUSER_GetSdmcCid(u8* out, u32 length);
+
423 Result FSUSER_IsSdmcDetected(bool *detected);
424 
425 /**
-
426  * @brief Gets the NAND CID.
-
427  * @param out Pointer to output the CID to.
-
428  * @param length Length of the CID buffer. (should be 0x10)
-
429  */
-
430 Result FSUSER_GetNandCid(u8* out, u32 length);
-
431 
-
432 /**
-
433  * @brief Gets the SDMC speed info.
-
434  * @param speedInfo Pointer to output the speed info to.
+
426  * @brief Gets whether the SD card is writable.
+
427  * @param detected Pointer to output the writable status to.
+
428  */
+
429 Result FSUSER_IsSdmcWritable(bool *writable);
+
430 
+
431 /**
+
432  * @brief Gets the SDMC CID.
+
433  * @param out Pointer to output the CID to.
+
434  * @param length Length of the CID buffer. (should be 0x10)
435  */
-
436 Result FSUSER_GetSdmcSpeedInfo(u32 *speedInfo);
+
436 Result FSUSER_GetSdmcCid(u8* out, u32 length);
437 
438 /**
-
439  * @brief Gets the NAND speed info.
-
440  * @param speedInfo Pointer to output the speed info to.
-
441  */
-
442 Result FSUSER_GetNandSpeedInfo(u32 *speedInfo);
-
443 
-
444 /**
-
445  * @brief Gets the SDMC log.
-
446  * @param out Pointer to output the log to.
-
447  * @param length Length of the log buffer.
+
439  * @brief Gets the NAND CID.
+
440  * @param out Pointer to output the CID to.
+
441  * @param length Length of the CID buffer. (should be 0x10)
+
442  */
+
443 Result FSUSER_GetNandCid(u8* out, u32 length);
+
444 
+
445 /**
+
446  * @brief Gets the SDMC speed info.
+
447  * @param speedInfo Pointer to output the speed info to.
448  */
-
449 Result FSUSER_GetSdmcLog(u8* out, u32 length);
+
449 Result FSUSER_GetSdmcSpeedInfo(u32 *speedInfo);
450 
451 /**
-
452  * @brief Gets the NAND log.
-
453  * @param out Pointer to output the log to.
-
454  * @param length Length of the log buffer.
-
455  */
-
456 Result FSUSER_GetNandLog(u8* out, u32 length);
-
457 
-
458 /// Clears the SDMC log.
-
459 Result FSUSER_ClearSdmcLog(void);
-
460 
-
461 /// Clears the NAND log.
-
462 Result FSUSER_ClearNandLog(void);
+
452  * @brief Gets the NAND speed info.
+
453  * @param speedInfo Pointer to output the speed info to.
+
454  */
+
455 Result FSUSER_GetNandSpeedInfo(u32 *speedInfo);
+
456 
+
457 /**
+
458  * @brief Gets the SDMC log.
+
459  * @param out Pointer to output the log to.
+
460  * @param length Length of the log buffer.
+
461  */
+
462 Result FSUSER_GetSdmcLog(u8* out, u32 length);
463 
464 /**
-
465  * @brief Gets whether a card is inserted.
-
466  * @param inserted Pointer to output the insertion status to.
-
467  */
-
468 Result FSUSER_CardSlotIsInserted(bool* inserted);
-
469 
-
470 /**
-
471  * @brief Powers on the card slot.
-
472  * @param status Pointer to output the power status to.
-
473  */
-
474 Result FSUSER_CardSlotPowerOn(bool* status);
-
475 
-
476 /**
-
477  * @brief Powers off the card slot.
-
478  * @param status Pointer to output the power status to.
-
479  */
-
480 Result FSUSER_CardSlotPowerOff(bool* status);
-
481 
-
482 /**
-
483  * @brief Gets the card's power status.
-
484  * @param status Pointer to output the power status to.
-
485  */
-
486 Result FSUSER_CardSlotGetCardIFPowerStatus(bool* status);
-
487 
-
488 /**
-
489  * @brief Executes a CARDNOR direct command.
-
490  * @param commandId ID of the command.
-
491  */
-
492 Result FSUSER_CardNorDirectCommand(u8 commandId);
-
493 
-
494 /**
-
495  * @brief Executes a CARDNOR direct command with an address.
-
496  * @param commandId ID of the command.
-
497  * @param address Address to provide.
+
465  * @brief Gets the NAND log.
+
466  * @param out Pointer to output the log to.
+
467  * @param length Length of the log buffer.
+
468  */
+
469 Result FSUSER_GetNandLog(u8* out, u32 length);
+
470 
+
471 /// Clears the SDMC log.
+
472 Result FSUSER_ClearSdmcLog(void);
+
473 
+
474 /// Clears the NAND log.
+
475 Result FSUSER_ClearNandLog(void);
+
476 
+
477 /**
+
478  * @brief Gets whether a card is inserted.
+
479  * @param inserted Pointer to output the insertion status to.
+
480  */
+
481 Result FSUSER_CardSlotIsInserted(bool* inserted);
+
482 
+
483 /**
+
484  * @brief Powers on the card slot.
+
485  * @param status Pointer to output the power status to.
+
486  */
+
487 Result FSUSER_CardSlotPowerOn(bool* status);
+
488 
+
489 /**
+
490  * @brief Powers off the card slot.
+
491  * @param status Pointer to output the power status to.
+
492  */
+
493 Result FSUSER_CardSlotPowerOff(bool* status);
+
494 
+
495 /**
+
496  * @brief Gets the card's power status.
+
497  * @param status Pointer to output the power status to.
498  */
-
499 Result FSUSER_CardNorDirectCommandWithAddress(u8 commandId, u32 address);
+
499 Result FSUSER_CardSlotGetCardIFPowerStatus(bool* status);
500 
501 /**
-
502  * @brief Executes a CARDNOR direct read.
+
502  * @brief Executes a CARDNOR direct command.
503  * @param commandId ID of the command.
-
504  * @param size Size of the output buffer.
-
505  * @param output Output buffer.
-
506  */
-
507 Result FSUSER_CardNorDirectRead(u8 commandId, u32 size, u8* output);
-
508 
-
509 /**
-
510  * @brief Executes a CARDNOR direct read with an address.
-
511  * @param commandId ID of the command.
-
512  * @param address Address to provide.
-
513  * @param size Size of the output buffer.
-
514  * @param output Output buffer.
-
515  */
-
516 Result FSUSER_CardNorDirectReadWithAddress(u8 commandId, u32 address, u32 size, u8* output);
-
517 
-
518 /**
-
519  * @brief Executes a CARDNOR direct write.
-
520  * @param commandId ID of the command.
-
521  * @param size Size of the input buffer.
-
522  * @param output Input buffer.
-
523  */
-
524 Result FSUSER_CardNorDirectWrite(u8 commandId, u32 size, u8* input);
-
525 
-
526 /**
-
527  * @brief Executes a CARDNOR direct write with an address.
-
528  * @param commandId ID of the command.
-
529  * @param address Address to provide.
-
530  * @param size Size of the input buffer.
-
531  * @param input Input buffer.
-
532  */
-
533 Result FSUSER_CardNorDirectWriteWithAddress(u8 commandId, u32 address, u32 size, u8* input);
-
534 
-
535 /**
-
536  * @brief Executes a CARDNOR 4xIO direct read.
-
537  * @param commandId ID of the command.
-
538  * @param address Address to provide.
-
539  * @param size Size of the output buffer.
-
540  * @param output Output buffer.
-
541  */
-
542 Result FSUSER_CardNorDirectRead_4xIO(u8 commandId, u32 address, u32 size, u8* output);
-
543 
-
544 /**
-
545  * @brief Executes a CARDNOR direct CPU write without verify.
-
546  * @param address Address to provide.
-
547  * @param size Size of the input buffer.
-
548  * @param output Input buffer.
-
549  */
-
550 Result FSUSER_CardNorDirectCpuWriteWithoutVerify(u32 address, u32 size, u8* input);
-
551 
-
552 /**
-
553  * @brief Executes a CARDNOR direct sector erase without verify.
-
554  * @param address Address to provide.
-
555  */
-
556 Result FSUSER_CardNorDirectSectorEraseWithoutVerify(u32 address);
-
557 
-
558 /**
-
559  * @brief Gets a process's product info.
-
560  * @param info Pointer to output the product info to.
-
561  * @param processId ID of the process.
+
504  */
+
505 Result FSUSER_CardNorDirectCommand(u8 commandId);
+
506 
+
507 /**
+
508  * @brief Executes a CARDNOR direct command with an address.
+
509  * @param commandId ID of the command.
+
510  * @param address Address to provide.
+
511  */
+
512 Result FSUSER_CardNorDirectCommandWithAddress(u8 commandId, u32 address);
+
513 
+
514 /**
+
515  * @brief Executes a CARDNOR direct read.
+
516  * @param commandId ID of the command.
+
517  * @param size Size of the output buffer.
+
518  * @param output Output buffer.
+
519  */
+
520 Result FSUSER_CardNorDirectRead(u8 commandId, u32 size, u8* output);
+
521 
+
522 /**
+
523  * @brief Executes a CARDNOR direct read with an address.
+
524  * @param commandId ID of the command.
+
525  * @param address Address to provide.
+
526  * @param size Size of the output buffer.
+
527  * @param output Output buffer.
+
528  */
+
529 Result FSUSER_CardNorDirectReadWithAddress(u8 commandId, u32 address, u32 size, u8* output);
+
530 
+
531 /**
+
532  * @brief Executes a CARDNOR direct write.
+
533  * @param commandId ID of the command.
+
534  * @param size Size of the input buffer.
+
535  * @param output Input buffer.
+
536  */
+
537 Result FSUSER_CardNorDirectWrite(u8 commandId, u32 size, u8* input);
+
538 
+
539 /**
+
540  * @brief Executes a CARDNOR direct write with an address.
+
541  * @param commandId ID of the command.
+
542  * @param address Address to provide.
+
543  * @param size Size of the input buffer.
+
544  * @param input Input buffer.
+
545  */
+
546 Result FSUSER_CardNorDirectWriteWithAddress(u8 commandId, u32 address, u32 size, u8* input);
+
547 
+
548 /**
+
549  * @brief Executes a CARDNOR 4xIO direct read.
+
550  * @param commandId ID of the command.
+
551  * @param address Address to provide.
+
552  * @param size Size of the output buffer.
+
553  * @param output Output buffer.
+
554  */
+
555 Result FSUSER_CardNorDirectRead_4xIO(u8 commandId, u32 address, u32 size, u8* output);
+
556 
+
557 /**
+
558  * @brief Executes a CARDNOR direct CPU write without verify.
+
559  * @param address Address to provide.
+
560  * @param size Size of the input buffer.
+
561  * @param output Input buffer.
562  */
-
563 Result FSUSER_GetProductInfo(FS_ProductInfo* info, u32 processId);
+
563 Result FSUSER_CardNorDirectCpuWriteWithoutVerify(u32 address, u32 size, u8* input);
564 
565 /**
-
566  * @brief Gets a process's program launch info.
-
567  * @param info Pointer to output the program launch info to.
-
568  * @param processId ID of the process.
-
569  */
-
570 Result FSUSER_GetProgramLaunchInfo(FS_ProgramInfo* info, u32 processId);
-
571 
-
572 /**
-
573  * @brief Sets the CARDSPI baud rate.
-
574  * @param baudRate Baud rate to set.
+
566  * @brief Executes a CARDNOR direct sector erase without verify.
+
567  * @param address Address to provide.
+
568  */
+
569 Result FSUSER_CardNorDirectSectorEraseWithoutVerify(u32 address);
+
570 
+
571 /**
+
572  * @brief Gets a process's product info.
+
573  * @param info Pointer to output the product info to.
+
574  * @param processId ID of the process.
575  */
-
576 Result FSUSER_SetCardSpiBaudRate(FS_CardSpiBaudRate baudRate);
+
576 Result FSUSER_GetProductInfo(FS_ProductInfo* info, u32 processId);
577 
578 /**
-
579  * @brief Sets the CARDSPI bus mode.
-
580  * @param baudRate Bus mode to set.
-
581  */
-
582 Result FSUSER_SetCardSpiBusMode(FS_CardSpiBusMode busMode);
-
583 
-
584 /// Sends initialization info to ARM9.
-
585 Result FSUSER_SendInitializeInfoTo9(void);
-
586 
-
587 /**
-
588  * @brief Gets a special content's index.
-
589  * @param index Pointer to output the index to.
-
590  * @param mediaType Media type of the special content.
-
591  * @param programId Program ID owning the special content.
-
592  * @param type Type of special content.
-
593  */
-
594 Result FSUSER_GetSpecialContentIndex(u16* index, FS_MediaType mediaType, u64 programId, FS_SpecialContentType type);
-
595 
-
596 /**
-
597  * @brief Gets the legacy ROM header of a program.
-
598  * @param mediaType Media type of the program.
-
599  * @param programId ID of the program.
-
600  * @param header Pointer to output the legacy ROM header to. (size = 0x3B4)
-
601  */
-
602 Result FSUSER_GetLegacyRomHeader(FS_MediaType mediaType, u64 programId, u8* header);
-
603 
-
604 /**
-
605  * @brief Gets the legacy banner data of a program.
-
606  * @param mediaType Media type of the program.
-
607  * @param programId ID of the program.
-
608  * @param header Pointer to output the legacy banner data to. (size = 0x23C0)
-
609  */
-
610 Result FSUSER_GetLegacyBannerData(FS_MediaType mediaType, u64 programId, u8* banner);
-
611 
-
612 /**
-
613  * @brief Checks a process's authority to access a save data archive.
-
614  * @param access Pointer to output the access status to.
-
615  * @param mediaType Media type of the save data.
-
616  * @param saveId ID of the save data.
-
617  * @param processId ID of the process to check.
-
618  */
-
619 Result FSUSER_CheckAuthorityToAccessExtSaveData(bool* access, FS_MediaType mediaType, u64 saveId, u32 processId);
-
620 
-
621 /**
-
622  * @brief Queries the total quota size of a save data archive.
-
623  * @param quotaSize Pointer to output the quota size to.
-
624  * @param directories Number of directories.
-
625  * @param files Number of files.
-
626  * @param fileSizeCount Number of file sizes to provide.
-
627  * @param fileSizes File sizes to provide.
-
628  */
-
629 Result FSUSER_QueryTotalQuotaSize(u64* quotaSize, u32 directories, u32 files, u32 fileSizeCount, u64* fileSizes);
-
630 
-
631 /**
-
632  * @brief Abnegates an access right.
-
633  * @param accessRight Access right to abnegate.
-
634  */
-
635 Result FSUSER_AbnegateAccessRight(u32 accessRight);
-
636 
-
637 /// Deletes the 3DS SDMC root.
-
638 Result FSUSER_DeleteSdmcRoot(void);
-
639 
-
640 /// Deletes all ext save data on the NAND.
-
641 Result FSUSER_DeleteAllExtSaveDataOnNand(void);
-
642 
-
643 /// Initializes the CTR file system.
-
644 Result FSUSER_InitializeCtrFileSystem(void);
-
645 
-
646 /// Creates the FS seed.
-
647 Result FSUSER_CreateSeed(void);
-
648 
-
649 /**
-
650  * @brief Retrieves archive format info.
-
651  * @param totalSize Pointer to output the total size to.
-
652  * @param directories Pointer to output the number of directories to.
-
653  * @param files Pointer to output the number of files to.
-
654  * @param duplicateData Pointer to output whether to duplicate data to.
-
655  * @param archiveId ID of the archive.
-
656  * @param path Path of the archive.
-
657  */
-
658 Result FSUSER_GetFormatInfo(u32* totalSize, u32* directories, u32* files, bool* duplicateData, FS_ArchiveID archiveId, FS_Path path);
-
659 
-
660 /**
-
661  * @brief Gets the legacy ROM header of a program.
-
662  * @param headerSize Size of the ROM header.
-
663  * @param mediaType Media type of the program.
-
664  * @param programId ID of the program.
-
665  * @param header Pointer to output the legacy ROM header to.
-
666  */
-
667 Result FSUSER_GetLegacyRomHeader2(u32 headerSize, FS_MediaType mediaType, u64 programId, u8* header);
-
668 
-
669 /**
-
670  * @brief Gets the CTR SDMC root path.
-
671  * @param out Pointer to output the root path to.
-
672  * @param length Length of the output buffer.
-
673  */
-
674 Result FSUSER_GetSdmcCtrRootPath(u8* out, u32 length);
-
675 
-
676 /**
-
677  * @brief Gets an archive's resource information.
-
678  * @param archiveResource Pointer to output the archive resource information to.
-
679  * @param mediaType Media type to check.
-
680  */
-
681 Result FSUSER_GetArchiveResource(FS_ArchiveResource* archiveResource, FS_MediaType mediaType);
-
682 
-
683 /**
-
684  * @brief Exports the integrity verification seed.
-
685  * @param seed Pointer to output the seed to.
+
579  * @brief Gets a process's program launch info.
+
580  * @param info Pointer to output the program launch info to.
+
581  * @param processId ID of the process.
+
582  */
+
583 Result FSUSER_GetProgramLaunchInfo(FS_ProgramInfo* info, u32 processId);
+
584 
+
585 /**
+
586  * @brief Sets the CARDSPI baud rate.
+
587  * @param baudRate Baud rate to set.
+
588  */
+
589 Result FSUSER_SetCardSpiBaudRate(FS_CardSpiBaudRate baudRate);
+
590 
+
591 /**
+
592  * @brief Sets the CARDSPI bus mode.
+
593  * @param baudRate Bus mode to set.
+
594  */
+
595 Result FSUSER_SetCardSpiBusMode(FS_CardSpiBusMode busMode);
+
596 
+
597 /// Sends initialization info to ARM9.
+
598 Result FSUSER_SendInitializeInfoTo9(void);
+
599 
+
600 /**
+
601  * @brief Gets a special content's index.
+
602  * @param index Pointer to output the index to.
+
603  * @param mediaType Media type of the special content.
+
604  * @param programId Program ID owning the special content.
+
605  * @param type Type of special content.
+
606  */
+
607 Result FSUSER_GetSpecialContentIndex(u16* index, FS_MediaType mediaType, u64 programId, FS_SpecialContentType type);
+
608 
+
609 /**
+
610  * @brief Gets the legacy ROM header of a program.
+
611  * @param mediaType Media type of the program.
+
612  * @param programId ID of the program.
+
613  * @param header Pointer to output the legacy ROM header to. (size = 0x3B4)
+
614  */
+
615 Result FSUSER_GetLegacyRomHeader(FS_MediaType mediaType, u64 programId, u8* header);
+
616 
+
617 /**
+
618  * @brief Gets the legacy banner data of a program.
+
619  * @param mediaType Media type of the program.
+
620  * @param programId ID of the program.
+
621  * @param header Pointer to output the legacy banner data to. (size = 0x23C0)
+
622  */
+
623 Result FSUSER_GetLegacyBannerData(FS_MediaType mediaType, u64 programId, u8* banner);
+
624 
+
625 /**
+
626  * @brief Checks a process's authority to access a save data archive.
+
627  * @param access Pointer to output the access status to.
+
628  * @param mediaType Media type of the save data.
+
629  * @param saveId ID of the save data.
+
630  * @param processId ID of the process to check.
+
631  */
+
632 Result FSUSER_CheckAuthorityToAccessExtSaveData(bool* access, FS_MediaType mediaType, u64 saveId, u32 processId);
+
633 
+
634 /**
+
635  * @brief Queries the total quota size of a save data archive.
+
636  * @param quotaSize Pointer to output the quota size to.
+
637  * @param directories Number of directories.
+
638  * @param files Number of files.
+
639  * @param fileSizeCount Number of file sizes to provide.
+
640  * @param fileSizes File sizes to provide.
+
641  */
+
642 Result FSUSER_QueryTotalQuotaSize(u64* quotaSize, u32 directories, u32 files, u32 fileSizeCount, u64* fileSizes);
+
643 
+
644 /**
+
645  * @brief Abnegates an access right.
+
646  * @param accessRight Access right to abnegate.
+
647  */
+
648 Result FSUSER_AbnegateAccessRight(u32 accessRight);
+
649 
+
650 /// Deletes the 3DS SDMC root.
+
651 Result FSUSER_DeleteSdmcRoot(void);
+
652 
+
653 /// Deletes all ext save data on the NAND.
+
654 Result FSUSER_DeleteAllExtSaveDataOnNand(void);
+
655 
+
656 /// Initializes the CTR file system.
+
657 Result FSUSER_InitializeCtrFileSystem(void);
+
658 
+
659 /// Creates the FS seed.
+
660 Result FSUSER_CreateSeed(void);
+
661 
+
662 /**
+
663  * @brief Retrieves archive format info.
+
664  * @param totalSize Pointer to output the total size to.
+
665  * @param directories Pointer to output the number of directories to.
+
666  * @param files Pointer to output the number of files to.
+
667  * @param duplicateData Pointer to output whether to duplicate data to.
+
668  * @param archiveId ID of the archive.
+
669  * @param path Path of the archive.
+
670  */
+
671 Result FSUSER_GetFormatInfo(u32* totalSize, u32* directories, u32* files, bool* duplicateData, FS_ArchiveID archiveId, FS_Path path);
+
672 
+
673 /**
+
674  * @brief Gets the legacy ROM header of a program.
+
675  * @param headerSize Size of the ROM header.
+
676  * @param mediaType Media type of the program.
+
677  * @param programId ID of the program.
+
678  * @param header Pointer to output the legacy ROM header to.
+
679  */
+
680 Result FSUSER_GetLegacyRomHeader2(u32 headerSize, FS_MediaType mediaType, u64 programId, u8* header);
+
681 
+
682 /**
+
683  * @brief Gets the CTR SDMC root path.
+
684  * @param out Pointer to output the root path to.
+
685  * @param length Length of the output buffer.
686  */
-
687 Result FSUSER_ExportIntegrityVerificationSeed(FS_IntegrityVerificationSeed* seed);
+
687 Result FSUSER_GetSdmcCtrRootPath(u8* out, u32 length);
688 
689 /**
-
690  * @brief Imports an integrity verification seed.
-
691  * @param seed Seed to import.
-
692  */
-
693 Result FSUSER_ImportIntegrityVerificationSeed(FS_IntegrityVerificationSeed* seed);
-
694 
-
695 /**
-
696  * @brief Formats save data.
-
697  * @param archiveId ID of the save data archive.
-
698  * @param path Path of the save data.
-
699  * @param blocks Size of the save data in blocks. (512 bytes)
-
700  * @param directories Number of directories.
-
701  * @param files Number of files.
-
702  * @param directoryBuckets Directory hash tree bucket count.
-
703  * @param fileBuckets File hash tree bucket count.
-
704  * @param duplicateData Whether to store an internal duplicate of the data.
+
690  * @brief Gets an archive's resource information.
+
691  * @param archiveResource Pointer to output the archive resource information to.
+
692  * @param mediaType Media type to check.
+
693  */
+
694 Result FSUSER_GetArchiveResource(FS_ArchiveResource* archiveResource, FS_MediaType mediaType);
+
695 
+
696 /**
+
697  * @brief Exports the integrity verification seed.
+
698  * @param seed Pointer to output the seed to.
+
699  */
+
700 Result FSUSER_ExportIntegrityVerificationSeed(FS_IntegrityVerificationSeed* seed);
+
701 
+
702 /**
+
703  * @brief Imports an integrity verification seed.
+
704  * @param seed Seed to import.
705  */
-
706 Result FSUSER_FormatSaveData(FS_ArchiveID archiveId, FS_Path path, u32 blocks, u32 directories, u32 files, u32 directoryBuckets, u32 fileBuckets, bool duplicateData);
+
706 Result FSUSER_ImportIntegrityVerificationSeed(FS_IntegrityVerificationSeed* seed);
707 
708 /**
-
709  * @brief Gets the legacy sub banner data of a program.
-
710  * @param bannerSize Size of the banner.
-
711  * @param mediaType Media type of the program.
-
712  * @param programId ID of the program.
-
713  * @param header Pointer to output the legacy sub banner data to.
-
714  */
-
715 Result FSUSER_GetLegacySubBannerData(u32 bannerSize, FS_MediaType mediaType, u64 programId, u8* banner);
-
716 
-
717 /**
-
718  * @brief Reads from a special file.
-
719  * @param bytesRead Pointer to output the number of bytes read to.
-
720  * @param fileOffset Offset of the file.
-
721  * @param size Size of the buffer.
-
722  * @param data Buffer to read to.
-
723  */
-
724 Result FSUSER_ReadSpecialFile(u32* bytesRead, u64 fileOffset, u32 size, u8* data);
-
725 
-
726 /**
-
727  * @brief Gets the size of a special file.
-
728  * @param fileSize Pointer to output the size to.
-
729  */
-
730 Result FSUSER_GetSpecialFileSize(u64* fileSize);
-
731 
-
732 /**
-
733  * @brief Creates ext save data.
-
734  * @param info Info of the save data.
-
735  * @param directories Number of directories.
-
736  * @param files Number of files.
-
737  * @param sizeLimit Size limit of the save data.
-
738  * @param smdhSize Size of the save data's SMDH data.
-
739  * @param smdh SMDH data.
-
740  */
-
741 Result FSUSER_CreateExtSaveData(FS_ExtSaveDataInfo info, u32 directories, u32 files, u64 sizeLimit, u32 smdhSize, u8* smdh);
-
742 
-
743 /**
-
744  * @brief Deletes ext save data.
-
745  * @param info Info of the save data.
-
746  */
-
747 Result FSUSER_DeleteExtSaveData(FS_ExtSaveDataInfo info);
-
748 
-
749 /**
-
750  * @brief Reads the SMDH icon of ext save data.
-
751  * @param bytesRead Pointer to output the number of bytes read to.
-
752  * @param info Info of the save data.
-
753  * @param smdhSize Size of the save data SMDH.
-
754  * @param smdh Pointer to output SMDH data to.
-
755  */
-
756 Result FSUSER_ReadExtSaveDataIcon(u32* bytesRead, FS_ExtSaveDataInfo info, u32 smdhSize, u8* smdh);
-
757 
-
758 /**
-
759  * @brief Gets an ext data archive's block information.
-
760  * @param totalBlocks Pointer to output the total blocks to.
-
761  * @param freeBlocks Pointer to output the free blocks to.
-
762  * @param blockSize Pointer to output the block size to.
-
763  * @param info Info of the save data.
-
764  */
-
765 Result FSUSER_GetExtDataBlockSize(u64* totalBlocks, u64* freeBlocks, u32* blockSize, FS_ExtSaveDataInfo info);
-
766 
-
767 /**
-
768  * @brief Enumerates ext save data.
-
769  * @param idsWritten Pointer to output the number of IDs written to.
-
770  * @param idsSize Size of the IDs buffer.
-
771  * @param mediaType Media type to enumerate over.
-
772  * @param idSize Size of each ID element.
-
773  * @param shared Whether to enumerate shared ext save data.
-
774  * @param ids Pointer to output IDs to.
-
775  */
-
776 Result FSUSER_EnumerateExtSaveData(u32* idsWritten, u32 idsSize, FS_MediaType mediaType, u32 idSize, bool shared, u8* ids);
-
777 
-
778 /**
-
779  * @brief Creates system save data.
-
780  * @param info Info of the save data.
-
781  * @param totalSize Total size of the save data.
-
782  * @param blockSize Block size of the save data. (usually 0x1000)
-
783  * @param directories Number of directories.
-
784  * @param files Number of files.
-
785  * @param directoryBuckets Directory hash tree bucket count.
-
786  * @param fileBuckets File hash tree bucket count.
-
787  * @param duplicateData Whether to store an internal duplicate of the data.
+
709  * @brief Formats save data.
+
710  * @param archiveId ID of the save data archive.
+
711  * @param path Path of the save data.
+
712  * @param blocks Size of the save data in blocks. (512 bytes)
+
713  * @param directories Number of directories.
+
714  * @param files Number of files.
+
715  * @param directoryBuckets Directory hash tree bucket count.
+
716  * @param fileBuckets File hash tree bucket count.
+
717  * @param duplicateData Whether to store an internal duplicate of the data.
+
718  */
+
719 Result FSUSER_FormatSaveData(FS_ArchiveID archiveId, FS_Path path, u32 blocks, u32 directories, u32 files, u32 directoryBuckets, u32 fileBuckets, bool duplicateData);
+
720 
+
721 /**
+
722  * @brief Gets the legacy sub banner data of a program.
+
723  * @param bannerSize Size of the banner.
+
724  * @param mediaType Media type of the program.
+
725  * @param programId ID of the program.
+
726  * @param header Pointer to output the legacy sub banner data to.
+
727  */
+
728 Result FSUSER_GetLegacySubBannerData(u32 bannerSize, FS_MediaType mediaType, u64 programId, u8* banner);
+
729 
+
730 /**
+
731  * @brief Reads from a special file.
+
732  * @param bytesRead Pointer to output the number of bytes read to.
+
733  * @param fileOffset Offset of the file.
+
734  * @param size Size of the buffer.
+
735  * @param data Buffer to read to.
+
736  */
+
737 Result FSUSER_ReadSpecialFile(u32* bytesRead, u64 fileOffset, u32 size, u8* data);
+
738 
+
739 /**
+
740  * @brief Gets the size of a special file.
+
741  * @param fileSize Pointer to output the size to.
+
742  */
+
743 Result FSUSER_GetSpecialFileSize(u64* fileSize);
+
744 
+
745 /**
+
746  * @brief Creates ext save data.
+
747  * @param info Info of the save data.
+
748  * @param directories Number of directories.
+
749  * @param files Number of files.
+
750  * @param sizeLimit Size limit of the save data.
+
751  * @param smdhSize Size of the save data's SMDH data.
+
752  * @param smdh SMDH data.
+
753  */
+
754 Result FSUSER_CreateExtSaveData(FS_ExtSaveDataInfo info, u32 directories, u32 files, u64 sizeLimit, u32 smdhSize, u8* smdh);
+
755 
+
756 /**
+
757  * @brief Deletes ext save data.
+
758  * @param info Info of the save data.
+
759  */
+
760 Result FSUSER_DeleteExtSaveData(FS_ExtSaveDataInfo info);
+
761 
+
762 /**
+
763  * @brief Reads the SMDH icon of ext save data.
+
764  * @param bytesRead Pointer to output the number of bytes read to.
+
765  * @param info Info of the save data.
+
766  * @param smdhSize Size of the save data SMDH.
+
767  * @param smdh Pointer to output SMDH data to.
+
768  */
+
769 Result FSUSER_ReadExtSaveDataIcon(u32* bytesRead, FS_ExtSaveDataInfo info, u32 smdhSize, u8* smdh);
+
770 
+
771 /**
+
772  * @brief Gets an ext data archive's block information.
+
773  * @param totalBlocks Pointer to output the total blocks to.
+
774  * @param freeBlocks Pointer to output the free blocks to.
+
775  * @param blockSize Pointer to output the block size to.
+
776  * @param info Info of the save data.
+
777  */
+
778 Result FSUSER_GetExtDataBlockSize(u64* totalBlocks, u64* freeBlocks, u32* blockSize, FS_ExtSaveDataInfo info);
+
779 
+
780 /**
+
781  * @brief Enumerates ext save data.
+
782  * @param idsWritten Pointer to output the number of IDs written to.
+
783  * @param idsSize Size of the IDs buffer.
+
784  * @param mediaType Media type to enumerate over.
+
785  * @param idSize Size of each ID element.
+
786  * @param shared Whether to enumerate shared ext save data.
+
787  * @param ids Pointer to output IDs to.
788  */
-
789 Result FSUSER_CreateSystemSaveData(FS_SystemSaveDataInfo info, u32 totalSize, u32 blockSize, u32 directories, u32 files, u32 directoryBuckets, u32 fileBuckets, bool duplicateData);
+
789 Result FSUSER_EnumerateExtSaveData(u32* idsWritten, u32 idsSize, FS_MediaType mediaType, u32 idSize, bool shared, u8* ids);
790 
791 /**
-
792  * @brief Deletes system save data.
+
792  * @brief Creates system save data.
793  * @param info Info of the save data.
-
794  */
-
795 Result FSUSER_DeleteSystemSaveData(FS_SystemSaveDataInfo info);
-
796 
-
797 /**
-
798  * @brief Initiates a device move as the source device.
-
799  * @param context Pointer to output the context to.
-
800  */
-
801 Result FSUSER_StartDeviceMoveAsSource(FS_DeviceMoveContext* context);
-
802 
-
803 /**
-
804  * @brief Initiates a device move as the destination device.
-
805  * @param context Context to use.
-
806  * @param clear Whether to clear the device's data first.
+
794  * @param totalSize Total size of the save data.
+
795  * @param blockSize Block size of the save data. (usually 0x1000)
+
796  * @param directories Number of directories.
+
797  * @param files Number of files.
+
798  * @param directoryBuckets Directory hash tree bucket count.
+
799  * @param fileBuckets File hash tree bucket count.
+
800  * @param duplicateData Whether to store an internal duplicate of the data.
+
801  */
+
802 Result FSUSER_CreateSystemSaveData(FS_SystemSaveDataInfo info, u32 totalSize, u32 blockSize, u32 directories, u32 files, u32 directoryBuckets, u32 fileBuckets, bool duplicateData);
+
803 
+
804 /**
+
805  * @brief Deletes system save data.
+
806  * @param info Info of the save data.
807  */
-
808 Result FSUSER_StartDeviceMoveAsDestination(FS_DeviceMoveContext context, bool clear);
+
808 Result FSUSER_DeleteSystemSaveData(FS_SystemSaveDataInfo info);
809 
810 /**
-
811  * @brief Sets an archive's priority.
-
812  * @param archive Archive to use.
-
813  * @param priority Priority to set.
-
814  */
-
815 Result FSUSER_SetArchivePriority(FS_Archive archive, u32 priority);
-
816 
-
817 /**
-
818  * @brief Gets an archive's priority.
-
819  * @param priority Pointer to output the priority to.
-
820  * @param archive Archive to use.
-
821  */
-
822 Result FSUSER_GetArchivePriority(u32* priority, FS_Archive archive);
-
823 
-
824 /**
-
825  * @brief Configures CTRCARD latency emulation.
-
826  * @param latency Latency to apply, in milliseconds.
-
827  * @param emulateEndurance Whether to emulate card endurance.
-
828  */
-
829 Result FSUSER_SetCtrCardLatencyParameter(u64 latency, bool emulateEndurance);
-
830 
-
831 /**
-
832  * @brief Toggles cleaning up invalid save data.
-
833  * @param Whether to enable cleaning up invalid save data.
+
811  * @brief Initiates a device move as the source device.
+
812  * @param context Pointer to output the context to.
+
813  */
+
814 Result FSUSER_StartDeviceMoveAsSource(FS_DeviceMoveContext* context);
+
815 
+
816 /**
+
817  * @brief Initiates a device move as the destination device.
+
818  * @param context Context to use.
+
819  * @param clear Whether to clear the device's data first.
+
820  */
+
821 Result FSUSER_StartDeviceMoveAsDestination(FS_DeviceMoveContext context, bool clear);
+
822 
+
823 /**
+
824  * @brief Sets an archive's priority.
+
825  * @param archive Archive to use.
+
826  * @param priority Priority to set.
+
827  */
+
828 Result FSUSER_SetArchivePriority(FS_Archive archive, u32 priority);
+
829 
+
830 /**
+
831  * @brief Gets an archive's priority.
+
832  * @param priority Pointer to output the priority to.
+
833  * @param archive Archive to use.
834  */
-
835 Result FSUSER_SwitchCleanupInvalidSaveData(bool enable);
+
835 Result FSUSER_GetArchivePriority(u32* priority, FS_Archive archive);
836 
837 /**
-
838  * @brief Enumerates system save data.
-
839  * @param idsWritten Pointer to output the number of IDs written to.
-
840  * @param idsSize Size of the IDs buffer.
-
841  * @param ids Pointer to output IDs to.
-
842  */
-
843 Result FSUSER_EnumerateSystemSaveData(u32* idsWritten, u32 idsSize, u64* ids);
-
844 
-
845 /**
-
846  * @brief Initializes the FSUSER session with an SDK version.
-
847  * @param version SDK version to initialize with.
-
848  */
-
849 Result FSUSER_InitializeWithSdkVersion(u32 version);
-
850 
-
851 /**
-
852  * @brief Sets the file system priority.
-
853  * @param priority Priority to set.
-
854  */
-
855 Result FSUSER_SetPriority(u32 priority);
-
856 
-
857 /**
-
858  * @brief Gets the file system priority.
-
859  * @param priority Pointer to output the priority to.
-
860  */
-
861 Result FSUSER_GetPriority(u32* priority);
-
862 
-
863 /**
-
864  * @brief Sets the save data secure value.
-
865  * @param value Secure value to set.
-
866  * @param slot Slot of the secure value.
-
867  * @param titleUniqueId Unique ID of the title. (default = 0)
-
868  * @param titleVariation Variation of the title. (default = 0)
-
869  */
-
870 Result FSUSER_SetSaveDataSecureValue(u64 value, FS_SecureValueSlot slot, u32 titleUniqueId, u8 titleVariation);
-
871 
-
872 /**
-
873  * @brief Gets the save data secure value.
-
874  * @param exists Pointer to output whether the secure value exists to.
-
875  * @param value Pointer to output the secure value to.
-
876  * @param slot Slot of the secure value.
-
877  * @param titleUniqueId Unique ID of the title. (default = 0)
-
878  * @param titleVariation Variation of the title. (default = 0)
-
879  */
-
880 Result FSUSER_GetSaveDataSecureValue(bool* exists, u64* value, FS_SecureValueSlot slot, u32 titleUniqueId, u8 titleVariation);
-
881 
-
882 /**
-
883  * @brief Performs a control operation on a secure save.
-
884  * @param action Action to perform.
-
885  * @param input Buffer to read input from.
-
886  * @param inputSize Size of the input.
-
887  * @param output Buffer to write output to.
-
888  * @param outputSize Size of the output.
-
889  */
-
890 Result FSUSER_ControlSecureSave(FS_SecureSaveAction action, void* input, u32 inputSize, void* output, u32 outputSize);
-
891 
-
892 /**
-
893  * @brief Gets the media type of the current application.
-
894  * @param mediaType Pointer to output the media type to.
-
895  */
-
896 Result FSUSER_GetMediaType(FS_MediaType* mediaType);
-
897 
-
898 /**
-
899  * @brief Performs a control operation on a file.
-
900  * @param handle Handle of the file.
-
901  * @param action Action to perform.
-
902  * @param input Buffer to read input from.
-
903  * @param inputSize Size of the input.
-
904  * @param output Buffer to write output to.
-
905  * @param outputSize Size of the output.
-
906  */
-
907 Result FSFILE_Control(Handle handle, FS_FileAction action, void* input, u32 inputSize, void* output, u32 outputSize);
-
908 
-
909 /**
-
910  * @brief Opens a handle to a sub-section of a file.
-
911  * @param handle Handle of the file.
-
912  * @param subFile Pointer to output the sub-file to.
-
913  * @param offset Offset of the sub-section.
-
914  * @param size Size of the sub-section.
-
915  */
-
916 Result FSFILE_OpenSubFile(Handle handle, Handle* subFile, u64 offset, u64 size);
-
917 
-
918 /**
-
919  * @brief Reads from a file.
-
920  * @param handle Handle of the file.
-
921  * @param bytesRead Pointer to output the number of bytes read to.
-
922  * @param offset Offset to read from.
-
923  * @param buffer Buffer to read to.
-
924  * @param size Size of the buffer.
-
925  */
-
926 Result FSFILE_Read(Handle handle, u32* bytesRead, u64 offset, void* buffer, u32 size);
-
927 
-
928 /**
-
929  * @brief Writes to a file.
-
930  * @param handle Handle of the file.
-
931  * @param bytesWritten Pointer to output the number of bytes written to.
-
932  * @param offset Offset to write to.
-
933  * @param buffer Buffer to write from.
-
934  * @param size Size of the buffer.
-
935  * @param flags Flags to use when writing.
-
936  */
-
937 Result FSFILE_Write(Handle handle, u32* bytesWritten, u64 offset, const void* buffer, u32 size, u32 flags);
-
938 
-
939 /**
-
940  * @brief Gets the size of a file.
-
941  * @param handle Handle of the file.
-
942  * @param size Pointer to output the size to.
-
943  */
-
944 Result FSFILE_GetSize(Handle handle, u64* size);
-
945 
-
946 /**
-
947  * @brief Sets the size of a file.
-
948  * @param handle Handle of the file.
-
949  * @param size Size to set.
+
838  * @brief Configures CTRCARD latency emulation.
+
839  * @param latency Latency to apply, in milliseconds.
+
840  * @param emulateEndurance Whether to emulate card endurance.
+
841  */
+
842 Result FSUSER_SetCtrCardLatencyParameter(u64 latency, bool emulateEndurance);
+
843 
+
844 /**
+
845  * @brief Toggles cleaning up invalid save data.
+
846  * @param Whether to enable cleaning up invalid save data.
+
847  */
+
848 Result FSUSER_SwitchCleanupInvalidSaveData(bool enable);
+
849 
+
850 /**
+
851  * @brief Enumerates system save data.
+
852  * @param idsWritten Pointer to output the number of IDs written to.
+
853  * @param idsSize Size of the IDs buffer.
+
854  * @param ids Pointer to output IDs to.
+
855  */
+
856 Result FSUSER_EnumerateSystemSaveData(u32* idsWritten, u32 idsSize, u64* ids);
+
857 
+
858 /**
+
859  * @brief Initializes a FSUSER session with an SDK version.
+
860  * @param session The handle of the FSUSER session to initialize.
+
861  * @param version SDK version to initialize with.
+
862  */
+
863 Result FSUSER_InitializeWithSdkVersion(Handle session, u32 version);
+
864 
+
865 /**
+
866  * @brief Sets the file system priority.
+
867  * @param priority Priority to set.
+
868  */
+
869 Result FSUSER_SetPriority(u32 priority);
+
870 
+
871 /**
+
872  * @brief Gets the file system priority.
+
873  * @param priority Pointer to output the priority to.
+
874  */
+
875 Result FSUSER_GetPriority(u32* priority);
+
876 
+
877 /**
+
878  * @brief Sets the save data secure value.
+
879  * @param value Secure value to set.
+
880  * @param slot Slot of the secure value.
+
881  * @param titleUniqueId Unique ID of the title. (default = 0)
+
882  * @param titleVariation Variation of the title. (default = 0)
+
883  */
+
884 Result FSUSER_SetSaveDataSecureValue(u64 value, FS_SecureValueSlot slot, u32 titleUniqueId, u8 titleVariation);
+
885 
+
886 /**
+
887  * @brief Gets the save data secure value.
+
888  * @param exists Pointer to output whether the secure value exists to.
+
889  * @param value Pointer to output the secure value to.
+
890  * @param slot Slot of the secure value.
+
891  * @param titleUniqueId Unique ID of the title. (default = 0)
+
892  * @param titleVariation Variation of the title. (default = 0)
+
893  */
+
894 Result FSUSER_GetSaveDataSecureValue(bool* exists, u64* value, FS_SecureValueSlot slot, u32 titleUniqueId, u8 titleVariation);
+
895 
+
896 /**
+
897  * @brief Performs a control operation on a secure save.
+
898  * @param action Action to perform.
+
899  * @param input Buffer to read input from.
+
900  * @param inputSize Size of the input.
+
901  * @param output Buffer to write output to.
+
902  * @param outputSize Size of the output.
+
903  */
+
904 Result FSUSER_ControlSecureSave(FS_SecureSaveAction action, void* input, u32 inputSize, void* output, u32 outputSize);
+
905 
+
906 /**
+
907  * @brief Gets the media type of the current application.
+
908  * @param mediaType Pointer to output the media type to.
+
909  */
+
910 Result FSUSER_GetMediaType(FS_MediaType* mediaType);
+
911 
+
912 /**
+
913  * @brief Performs a control operation on a file.
+
914  * @param handle Handle of the file.
+
915  * @param action Action to perform.
+
916  * @param input Buffer to read input from.
+
917  * @param inputSize Size of the input.
+
918  * @param output Buffer to write output to.
+
919  * @param outputSize Size of the output.
+
920  */
+
921 Result FSFILE_Control(Handle handle, FS_FileAction action, void* input, u32 inputSize, void* output, u32 outputSize);
+
922 
+
923 /**
+
924  * @brief Opens a handle to a sub-section of a file.
+
925  * @param handle Handle of the file.
+
926  * @param subFile Pointer to output the sub-file to.
+
927  * @param offset Offset of the sub-section.
+
928  * @param size Size of the sub-section.
+
929  */
+
930 Result FSFILE_OpenSubFile(Handle handle, Handle* subFile, u64 offset, u64 size);
+
931 
+
932 /**
+
933  * @brief Reads from a file.
+
934  * @param handle Handle of the file.
+
935  * @param bytesRead Pointer to output the number of bytes read to.
+
936  * @param offset Offset to read from.
+
937  * @param buffer Buffer to read to.
+
938  * @param size Size of the buffer.
+
939  */
+
940 Result FSFILE_Read(Handle handle, u32* bytesRead, u64 offset, void* buffer, u32 size);
+
941 
+
942 /**
+
943  * @brief Writes to a file.
+
944  * @param handle Handle of the file.
+
945  * @param bytesWritten Pointer to output the number of bytes written to.
+
946  * @param offset Offset to write to.
+
947  * @param buffer Buffer to write from.
+
948  * @param size Size of the buffer.
+
949  * @param flags Flags to use when writing.
950  */
-
951 Result FSFILE_SetSize(Handle handle, u64 size);
+
951 Result FSFILE_Write(Handle handle, u32* bytesWritten, u64 offset, const void* buffer, u32 size, u32 flags);
952 
953 /**
-
954  * @brief Gets the attributes of a file.
+
954  * @brief Gets the size of a file.
955  * @param handle Handle of the file.
-
956  * @param attributes Pointer to output the attributes to.
+
956  * @param size Pointer to output the size to.
957  */
-
958 Result FSFILE_GetAttributes(Handle handle, u32* attributes);
+
958 Result FSFILE_GetSize(Handle handle, u64* size);
959 
960 /**
-
961  * @brief Sets the attributes of a file.
+
961  * @brief Sets the size of a file.
962  * @param handle Handle of the file.
-
963  * @param attributes Attributes to set.
+
963  * @param size Size to set.
964  */
-
965 Result FSFILE_SetAttributes(Handle handle, u32 attributes);
+
965 Result FSFILE_SetSize(Handle handle, u64 size);
966 
967 /**
-
968  * @brief Closes a file.
+
968  * @brief Gets the attributes of a file.
969  * @param handle Handle of the file.
-
970  */
-
971 Result FSFILE_Close(Handle handle);
-
972 
-
973 /**
-
974  * @brief Flushes a file's contents.
-
975  * @param handle Handle of the file.
-
976  */
-
977 Result FSFILE_Flush(Handle handle);
-
978 
-
979 /**
-
980  * @brief Sets a file's priority.
-
981  * @param handle Handle of the file.
-
982  * @param priority Priority to set.
-
983  */
-
984 Result FSFILE_SetPriority(Handle handle, u32 priority);
-
985 
-
986 /**
-
987  * @brief Gets a file's priority.
-
988  * @param handle Handle of the file.
-
989  * @param priority Pointer to output the priority to.
+
970  * @param attributes Pointer to output the attributes to.
+
971  */
+
972 Result FSFILE_GetAttributes(Handle handle, u32* attributes);
+
973 
+
974 /**
+
975  * @brief Sets the attributes of a file.
+
976  * @param handle Handle of the file.
+
977  * @param attributes Attributes to set.
+
978  */
+
979 Result FSFILE_SetAttributes(Handle handle, u32 attributes);
+
980 
+
981 /**
+
982  * @brief Closes a file.
+
983  * @param handle Handle of the file.
+
984  */
+
985 Result FSFILE_Close(Handle handle);
+
986 
+
987 /**
+
988  * @brief Flushes a file's contents.
+
989  * @param handle Handle of the file.
990  */
-
991 Result FSFILE_GetPriority(Handle handle, u32* priority);
+
991 Result FSFILE_Flush(Handle handle);
992 
993 /**
-
994  * @brief Opens a duplicate handle to a file.
+
994  * @brief Sets a file's priority.
995  * @param handle Handle of the file.
-
996  * @param linkFile Pointer to output the link handle to.
+
996  * @param priority Priority to set.
997  */
-
998 Result FSFILE_OpenLinkFile(Handle handle, Handle* linkFile);
+
998 Result FSFILE_SetPriority(Handle handle, u32 priority);
999 
1000 /**
-
1001  * @brief Performs a control operation on a directory.
-
1002  * @param handle Handle of the directory.
-
1003  * @param action Action to perform.
-
1004  * @param input Buffer to read input from.
-
1005  * @param inputSize Size of the input.
-
1006  * @param output Buffer to write output to.
-
1007  * @param outputSize Size of the output.
-
1008  */
-
1009 Result FSDIR_Control(Handle handle, FS_DirectoryAction action, void* input, u32 inputSize, void* output, u32 outputSize);
-
1010 
-
1011 /**
-
1012  * @brief Reads one or more directory entries.
-
1013  * @param handle Handle of the directory.
-
1014  * @param entriesRead Pointer to output the number of entries read to.
-
1015  * @param entryCount Number of entries to read.
-
1016  * @param entryOut Pointer to output directory entries to.
-
1017  */
-
1018 Result FSDIR_Read(Handle handle, u32* entriesRead, u32 entryCount, FS_DirectoryEntry* entries);
-
1019 
-
1020 /**
-
1021  * @brief Closes a directory.
-
1022  * @param handle Handle of the directory.
-
1023  */
-
1024 Result FSDIR_Close(Handle handle);
-
1025 
-
1026 /**
-
1027  * @brief Sets a directory's priority.
-
1028  * @param handle Handle of the directory.
-
1029  * @param priority Priority to set.
-
1030  */
-
1031 Result FSDIR_SetPriority(Handle handle, u32 priority);
-
1032 
-
1033 /**
-
1034  * @brief Gets a directory's priority.
-
1035  * @param handle Handle of the directory.
-
1036  * @param priority Pointer to output the priority to.
+
1001  * @brief Gets a file's priority.
+
1002  * @param handle Handle of the file.
+
1003  * @param priority Pointer to output the priority to.
+
1004  */
+
1005 Result FSFILE_GetPriority(Handle handle, u32* priority);
+
1006 
+
1007 /**
+
1008  * @brief Opens a duplicate handle to a file.
+
1009  * @param handle Handle of the file.
+
1010  * @param linkFile Pointer to output the link handle to.
+
1011  */
+
1012 Result FSFILE_OpenLinkFile(Handle handle, Handle* linkFile);
+
1013 
+
1014 /**
+
1015  * @brief Performs a control operation on a directory.
+
1016  * @param handle Handle of the directory.
+
1017  * @param action Action to perform.
+
1018  * @param input Buffer to read input from.
+
1019  * @param inputSize Size of the input.
+
1020  * @param output Buffer to write output to.
+
1021  * @param outputSize Size of the output.
+
1022  */
+
1023 Result FSDIR_Control(Handle handle, FS_DirectoryAction action, void* input, u32 inputSize, void* output, u32 outputSize);
+
1024 
+
1025 /**
+
1026  * @brief Reads one or more directory entries.
+
1027  * @param handle Handle of the directory.
+
1028  * @param entriesRead Pointer to output the number of entries read to.
+
1029  * @param entryCount Number of entries to read.
+
1030  * @param entryOut Pointer to output directory entries to.
+
1031  */
+
1032 Result FSDIR_Read(Handle handle, u32* entriesRead, u32 entryCount, FS_DirectoryEntry* entries);
+
1033 
+
1034 /**
+
1035  * @brief Closes a directory.
+
1036  * @param handle Handle of the directory.
1037  */
-
1038 Result FSDIR_GetPriority(Handle handle, u32* priority);
+
1038 Result FSDIR_Close(Handle handle);
+
1039 
+
1040 /**
+
1041  * @brief Sets a directory's priority.
+
1042  * @param handle Handle of the directory.
+
1043  * @param priority Priority to set.
+
1044  */
+
1045 Result FSDIR_SetPriority(Handle handle, u32 priority);
+
1046 
+
1047 /**
+
1048  * @brief Gets a directory's priority.
+
1049  * @param handle Handle of the directory.
+
1050  * @param priority Pointer to output the priority to.
+
1051  */
+
1052 Result FSDIR_GetPriority(Handle handle, u32* priority);
#define PACKED
Packs a struct (and other types?) so it won't include padding bytes.
Definition: types.h:44
u32 reserved2
Reserved.
Definition: fs.h:200
Various system types.
-- 2.39.5