File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ extern "C" {
8686
8787#include <3ds/applets/miiselector.h>
8888
89- #include <3ds/sdmc .h>
89+ #include <3ds/archive .h>
9090#include <3ds/romfs.h>
9191#include <3ds/font.h>
9292#include <3ds/mii.h>
@@ -142,4 +142,3 @@ extern "C" {
142142 * @example threads/thread-basic/source/main.c
143143 * @example time/rtc/source/main.c
144144 */
145-
Original file line number Diff line number Diff line change 1+ /**
2+ * @file archive.h
3+ * @brief FS_Archive driver
4+ */
5+ #pragma once
6+
7+ #include <sys/types.h>
8+
9+ #include <3ds/types.h>
10+ #include <3ds/services/fs.h>
11+
12+ #define ARCHIVE_DIRITER_MAGIC 0x68637261 /* "arch" */
13+
14+ /*! Open directory struct */
15+ typedef struct
16+ {
17+ u32 magic ; /*! "arch" */
18+ Handle fd ; /*! CTRU handle */
19+ ssize_t index ; /*! Current entry index */
20+ size_t size ; /*! Current batch size */
21+ FS_DirectoryEntry entry_data [32 ]; /*! Temporary storage for reading entries */
22+ } archive_dir_t ;
23+
24+ /// Mounts the SD
25+ Result archiveMountSdmc (void );
26+
27+ /// Mounts and opens an archive as deviceName
28+ /// Returns either an archive open error code, or -1 for generic failure
29+ Result archiveMount (FS_ArchiveID archiveID , FS_Path archivePath , const char * deviceName );
30+
31+ /// Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount.
32+ /// Returns -1 if the specified device is not found
33+ Result archiveCommitSaveData (const char * deviceName );
34+
35+ /// Unmounts the specified device, closing its archive in the process
36+ /// Returns -1 if the specified device was not found
37+ Result archiveUnmount (const char * deviceName );
38+
39+ /// Unmounts all devices and cleans up any resources used by the driver
40+ Result archiveUnmountAll (void );
41+
42+ /// Get a file's mtime
43+ Result archive_getmtime (const char * name , u64 * mtime );
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments