libnx  v4.2.0
fs.h
Go to the documentation of this file.
1 /**
2  * @file fs.h
3  * @brief Filesystem (fsp-srv) service IPC wrapper.
4  * Normally applications should just use standard stdio not FS-serv directly. However this can be used if obtaining a FsFileSystem, FsFile, or FsStorage, for mounting with fs_dev/romfs_dev, etc.
5  * @author plutoo
6  * @author yellows8
7  * @copyright libnx Authors
8  */
9 #pragma once
10 #include "../types.h"
11 #include "../kernel/event.h"
12 #include "../services/ncm_types.h"
13 #include "../services/acc.h"
14 #include "../sf/service.h"
15 
16 // We use wrapped handles for type safety.
17 
18 #define FS_MAX_PATH 0x301
19 
20 /// For use with \ref FsSaveDataAttribute.
21 #define FS_SAVEDATA_CURRENT_APPLICATIONID 0
22 
23 typedef struct {
24  u8 c[0x10];
25 } FsRightsId;
26 
27 typedef struct {
28  Service s;
29 } FsFileSystem;
30 
31 typedef struct {
32  Service s;
33 } FsFile;
34 
35 typedef struct {
36  Service s;
37 } FsDir;
38 
39 typedef struct {
40  Service s;
41 } FsStorage;
42 
43 typedef struct {
44  Service s;
46 
47 typedef struct {
48  Service s;
50 
51 typedef struct {
52  Service s;
54 
55 /// Directory entry.
56 typedef struct {
57  char name[FS_MAX_PATH]; ///< Entry name.
58  u8 pad[3];
59  s8 type; ///< See FsDirEntryType.
60  u8 pad2[3]; ///< ?
61  s64 file_size; ///< File size.
63 
64 /// SaveDataAttribute
65 typedef struct {
66  u64 application_id; ///< ApplicationId of the savedata to access when accessing other programs' savedata via SaveData, otherwise FS_SAVEDATA_CURRENT_APPLICATIONID.
67  AccountUid uid; ///< \ref AccountUid for the user-specific savedata to access, otherwise 0 for common savedata.
68  u64 system_save_data_id; ///< SystemSaveDataId, 0 for ::FsSaveDataType_Account.
69  u8 save_data_type; ///< \ref FsSaveDataType
70  u8 save_data_rank; ///< \ref FsSaveDataRank
71  u16 save_data_index; ///< SaveDataIndex
72  u32 pad_x24; ///< Padding.
73  u64 unk_x28; ///< 0 for ::FsSaveDataType_System/::FsSaveDataType_Account.
74  u64 unk_x30; ///< 0 for ::FsSaveDataType_System/::FsSaveDataType_Account.
75  u64 unk_x38; ///< 0 for ::FsSaveDataType_System/::FsSaveDataType_Account.
77 
78 /// SaveDataExtraData
79 typedef struct {
80  FsSaveDataAttribute attr; ///< \ref FsSaveDataAttribute
81  u64 owner_id; ///< ProgramId of the owner of this save data. 0 for ::FsSaveDataType_System.
82  u64 timestamp; ///< POSIX timestamp.
83  u32 flags; ///< \ref FsSaveDataFlags
84  u32 unk_x54; ///< Normally 0. Possibly unused?
85  s64 data_size; ///< Usable save data size.
86  s64 journal_size; ///< Journal size of the save data.
87  u64 commit_id; ///< Id of the latest commit.
88  u8 unused[0x190]; ///< Uninitialized.
90 
91 /// SaveDataMetaInfo
92 typedef struct {
93  u32 size;
94  u8 type; ///< \ref FsSaveDataMetaType
95  u8 reserved[0x0B];
97 
98 /// SaveDataCreationInfo
99 typedef struct {
100  s64 save_data_size; ///< Size of the save data.
101  s64 journal_size; ///< Journal size of the save data.
102  u64 available_size; ///< AvailableSize
103  u64 owner_id; ///< ProgramId of the owner of this save data. 0 for ::FsSaveDataType_System.
104  u32 flags; ///< \ref FsSaveDataFlags
105  u8 save_data_space_id; ///< \ref FsSaveDataSpaceId
106  u8 unk; ///< 0 for ::FsSaveDataType_System.
107  u8 padding[0x1a]; ///< Uninitialized for ::FsSaveDataType_System.
109 
110 /// SaveDataInfo
111 typedef struct {
112  u64 save_data_id; ///< SaveDataId
113  u8 save_data_space_id; ///< \ref FsSaveDataSpaceId
114  u8 save_data_type; ///< \ref FsSaveDataType
115  u8 pad[6]; ///< Padding.
116  AccountUid uid; ///< FsSave::userID
117  u64 system_save_data_id; ///< FsSaveDataAttribute::system_save_data_id
118  u64 application_id; ///< ApplicationId for ::FsSaveDataType_Account.
119  u64 size; ///< Raw saveimage size.
120  u16 save_data_index; ///< SaveDataIndex
121  u8 save_data_rank; ///< \ref FsSaveDataRank
122  u8 unk_x3b[0x25]; ///< Unknown. Usually zeros?
124 
125 typedef struct {
126  u64 created; ///< POSIX timestamp.
127  u64 modified; ///< POSIX timestamp.
128  u64 accessed; ///< POSIX timestamp.
129  u8 is_valid; ///< 0x1 when the timestamps are set.
130  u8 padding[7];
132 
133 /// This is nn::fssystem::ArchiveMacKey. Used by \ref setsysGetThemeKey and \ref setsysSetThemeKey. Does not appear to be in use elsewhere.
134 typedef struct {
135  u8 key[0x10];
137 
138 /// Returned by fsFsGetEntryType.
139 typedef enum {
140  FsDirEntryType_Dir = 0, ///< Entry is a directory.
141  FsDirEntryType_File = 1, ///< Entry is a file.
143 
144 /// For use with fsFsOpenFile.
145 typedef enum {
146  FsOpenMode_Read = BIT(0), ///< Open for reading.
147  FsOpenMode_Write = BIT(1), ///< Open for writing.
148  FsOpenMode_Append = BIT(2), ///< Append file.
149 } FsOpenMode;
150 
151 /// For use with fsFsCreateFile.
152 typedef enum {
153  FsCreateOption_BigFile = BIT(0), ///< Creates a ConcatenationFile (dir with archive bit) instead of file.
155 
156 /// For use with fsFsOpenDirectory.
157 typedef enum {
158  FsDirOpenMode_ReadDirs = BIT(0), ///< Enable reading directory entries.
159  FsDirOpenMode_ReadFiles = BIT(1), ///< Enable reading file entries.
160  FsDirOpenMode_NoFileSize = BIT(31), ///< Causes result entries to not contain filesize information (always 0).
161 } FsDirOpenMode;
162 
163 /// For use with fsFileRead.
164 typedef enum {
165  FsReadOption_None = 0, ///< No option.
166 } FsReadOption;
167 
168 /// For use with fsFileWrite.
169 typedef enum {
170  FsWriteOption_None = 0, ///< No option.
171  FsWriteOption_Flush = BIT(0), ///< Forces a flush after write.
172 } FsWriteOption;
173 
174 typedef enum {
175  FsContentStorageId_System = 0,
176  FsContentStorageId_User = 1,
177  FsContentStorageId_SdCard = 2,
178 } FsContentStorageId;
179 
180 typedef enum {
181  FsCustomStorageId_System = 0,
182  FsCustomStorageId_SdCard = 1,
183 } FsCustomStorageId;
184 
185 /// ImageDirectoryId
186 typedef enum {
187  FsImageDirectoryId_Nand = 0,
188  FsImageDirectoryId_Sd = 1,
190 
191 /// SaveDataSpaceId
192 typedef enum {
193  FsSaveDataSpaceId_System = 0, ///< System
194  FsSaveDataSpaceId_User = 1, ///< User
195  FsSaveDataSpaceId_SdSystem = 2, ///< SdSystem
196  FsSaveDataSpaceId_Temporary = 3, ///< [3.0.0+] Temporary
197  FsSaveDataSpaceId_SdUser = 4, ///< [4.0.0+] SdUser
198  FsSaveDataSpaceId_ProperSystem = 100, ///< [3.0.0+] ProperSystem
199  FsSaveDataSpaceId_SafeMode = 101, ///< [3.0.0+] SafeMode
200 
201  FsSaveDataSpaceId_All = -1, ///< Pseudo value for fsOpenSaveDataInfoReader().
203 
204 /// SaveDataType
205 typedef enum {
206  FsSaveDataType_System = 0, ///< System
207  FsSaveDataType_Account = 1, ///< Account
208  FsSaveDataType_Bcat = 2, ///< Bcat
209  FsSaveDataType_Device = 3, ///< Device
210  FsSaveDataType_Temporary = 4, ///< [3.0.0+] Temporary
211  FsSaveDataType_Cache = 5, ///< [3.0.0+] Cache
212  FsSaveDataType_SystemBcat = 6, ///< [4.0.0+] SystemBcat
214 
215 /// SaveDataRank
216 typedef enum {
217  FsSaveDataRank_Primary = 0, ///< Primary
218  FsSaveDataRank_Secondary = 1, ///< Secondary
220 
221 /// SaveDataFlags
222 typedef enum {
223  FsSaveDataFlags_KeepAfterResettingSystemSaveData = BIT(0),
224  FsSaveDataFlags_KeepAfterRefurbishment = BIT(1),
225  FsSaveDataFlags_KeepAfterResettingSystemSaveDataWithoutUserSaveData = BIT(2),
226  FsSaveDataFlags_NeedsSecureDelete = BIT(3),
228 
229 /// SaveDataMetaType
230 typedef enum {
231  FsSaveDataMetaType_None = 0,
232  FsSaveDataMetaType_Thumbnail = 1,
233  FsSaveDataMetaType_ExtensionContext = 2,
235 
236 typedef enum {
237  FsGameCardAttribute_AutoBootFlag = BIT(0), ///< Causes the cartridge to automatically start on bootup
238  FsGameCardAttribute_HistoryEraseFlag = BIT(1), ///< Causes NS to throw an error on attempt to load the cartridge
239  FsGameCardAttribute_RepairToolFlag = BIT(2), ///< [4.0.0+] Indicates that this gamecard is a repair tool.
240  FsGameCardAttribute_DifferentRegionCupToTerraDeviceFlag = BIT(3), ///< [9.0.0+] DifferentRegionCupToTerraDeviceFlag
241  FsGameCardAttribute_DifferentRegionCupToGlobalDeviceFlag = BIT(4), ///< [9.0.0+] DifferentRegionCupToGlobalDeviceFlag
243 
244 typedef enum {
245  FsGameCardPartition_Update = 0,
246  FsGameCardPartition_Normal = 1,
247  FsGameCardPartition_Secure = 2,
248  FsGameCardPartition_Logo = 3, ///< [4.0.0+]
250 
251 typedef struct {
252  u32 value;
254 
255 typedef struct {
256  u32 aes_ctr_key_type; ///< Contains bitflags describing how data is AES encrypted.
257  u32 speed_emulation_type; ///< Contains bitflags describing how data is emulated.
258  u32 reserved[0x38/sizeof(u32)];
259 } FsRangeInfo;
260 
261 typedef enum {
262  FsOperationId_Clear, ///< Fill range with zero for supported file/storage.
263  FsOperationId_ClearSignature, ///< Clears signature for supported file/storage.
264  FsOperationId_InvalidateCache, ///< Invalidates cache for supported file/storage.
265  FsOperationId_QueryRange, ///< Retrieves information on data for supported file/storage.
266 } FsOperationId;
267 
268 /// BisPartitionId
269 typedef enum {
270  FsBisPartitionId_BootPartition1Root = 0,
271 
272  FsBisPartitionId_BootPartition2Root = 10,
273 
274  FsBisPartitionId_UserDataRoot = 20,
275  FsBisPartitionId_BootConfigAndPackage2Part1 = 21,
276  FsBisPartitionId_BootConfigAndPackage2Part2 = 22,
277  FsBisPartitionId_BootConfigAndPackage2Part3 = 23,
278  FsBisPartitionId_BootConfigAndPackage2Part4 = 24,
279  FsBisPartitionId_BootConfigAndPackage2Part5 = 25,
280  FsBisPartitionId_BootConfigAndPackage2Part6 = 26,
281  FsBisPartitionId_CalibrationBinary = 27,
282  FsBisPartitionId_CalibrationFile = 28,
283  FsBisPartitionId_SafeMode = 29,
284  FsBisPartitionId_User = 30,
285  FsBisPartitionId_System = 31,
286  FsBisPartitionId_SystemProperEncryption = 32,
287  FsBisPartitionId_SystemProperPartition = 33,
288  FsBisPartitionId_SignedSystemPartitionOnSafeMode = 34,
290 
291 /// FileSystemType
292 typedef enum {
293  FsFileSystemType_Logo = 2, ///< Logo
294  FsFileSystemType_ContentControl = 3, ///< ContentControl
295  FsFileSystemType_ContentManual = 4, ///< ContentManual
296  FsFileSystemType_ContentMeta = 5, ///< ContentMeta
297  FsFileSystemType_ContentData = 6, ///< ContentData
298  FsFileSystemType_ApplicationPackage = 7, ///< ApplicationPackage
299  FsFileSystemType_RegisteredUpdate = 8, ///< [4.0.0+] RegisteredUpdate
301 
302 /// FileSystemQueryId
303 typedef enum {
307 
308 /// FsPriority
309 typedef enum {
310  FsPriority_Normal = 0,
311  FsPriority_Realtime = 1,
312  FsPriority_Low = 2,
313  FsPriority_Background = 3,
314 } FsPriority;
315 
316 /// For use with fsOpenHostFileSystemWithOption
317 typedef enum {
318  FsMountHostOptionFlag_None = 0, ///< Host filesystem will be case insensitive.
319  FsMountHostOptionFlag_PseudoCaseSensitive = BIT(0), ///< Host filesystem will be pseudo case sensitive.
321 
322 /// Initialize fsp-srv. Used automatically during app startup.
323 Result fsInitialize(void);
324 
325 /// Exit fsp-srv. Used automatically during app exit.
326 void fsExit(void);
327 
328 /// Gets the Service object for the actual fsp-srv service session.
330 
331 /// [5.0.0+] Configures the \ref FsPriority of all filesystem commands issued within the current thread.
332 void fsSetPriority(FsPriority prio);
333 
334 /// Mount requested filesystem type from content file
335 Result fsOpenFileSystem(FsFileSystem* out, FsFileSystemType fsType, const char* contentPath); ///< same as calling fsOpenFileSystemWithId with 0 as id
336 Result fsOpenDataFileSystemByCurrentProcess(FsFileSystem *out);
337 Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 id, FsFileSystemType fsType); ///< [2.0.0+], like OpenFileSystemWithId but without content path.
338 Result fsOpenFileSystemWithId(FsFileSystem* out, u64 id, FsFileSystemType fsType, const char* contentPath); ///< works on all firmwares, id is ignored on [1.0.0]
339 Result fsOpenDataFileSystemByProgramId(FsFileSystem *out, u64 program_id); ///< [3.0.0+]
340 Result fsOpenBisFileSystem(FsFileSystem* out, FsBisPartitionId partitionId, const char* string);
341 Result fsOpenBisStorage(FsStorage* out, FsBisPartitionId partitionId);
342 
343 /// Do not call this directly, see fs_dev.h.
345 
346 Result fsOpenHostFileSystem(FsFileSystem* out, const char *path);
347 Result fsOpenHostFileSystemWithOption(FsFileSystem* out, const char *path, u32 flags); ///< [9.0.0+]
348 
349 Result fsDeleteSaveDataFileSystem(u64 application_id);
350 Result fsCreateSaveDataFileSystem(const FsSaveDataAttribute* attr, const FsSaveDataCreationInfo* creation_info, const FsSaveDataMetaInfo* meta);
351 Result fsCreateSaveDataFileSystemBySystemSaveDataId(const FsSaveDataAttribute* attr, const FsSaveDataCreationInfo* creation_info);
352 Result fsDeleteSaveDataFileSystemBySaveDataSpaceId(FsSaveDataSpaceId save_data_space_id, u64 saveID); ///< [2.0.0+]
354 
355 Result fsIsExFatSupported(bool* out);
356 
357 Result fsOpenGameCardFileSystem(FsFileSystem* out, const FsGameCardHandle* handle, FsGameCardPartition partition);
358 
359 Result fsExtendSaveDataFileSystem(FsSaveDataSpaceId save_data_space_id, u64 saveID, s64 dataSize, s64 journalSize); ///< [3.0.0+]
360 
361 Result fsOpenSaveDataFileSystem(FsFileSystem* out, FsSaveDataSpaceId save_data_space_id, const FsSaveDataAttribute *attr);
362 Result fsOpenSaveDataFileSystemBySystemSaveDataId(FsFileSystem* out, FsSaveDataSpaceId save_data_space_id, const FsSaveDataAttribute *attr);
363 Result fsOpenReadOnlySaveDataFileSystem(FsFileSystem* out, FsSaveDataSpaceId save_data_space_id, const FsSaveDataAttribute *attr); ///< [2.0.0+].
364 
365 Result fsReadSaveDataFileSystemExtraDataBySaveDataSpaceId(void* buf, size_t len, FsSaveDataSpaceId save_data_space_id, u64 saveID);
366 Result fsReadSaveDataFileSystemExtraData(void* buf, size_t len, u64 saveID);
367 Result fsWriteSaveDataFileSystemExtraData(const void* buf, size_t len, FsSaveDataSpaceId save_data_space_id, u64 saveID);
368 
369 Result fsOpenSaveDataInfoReader(FsSaveDataInfoReader* out, FsSaveDataSpaceId save_data_space_id);
370 
371 Result fsOpenImageDirectoryFileSystem(FsFileSystem* out, FsImageDirectoryId image_directory_id);
372 Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id);
373 Result fsOpenCustomStorageFileSystem(FsFileSystem* out, FsCustomStorageId custom_storage_id); ///< [7.0.0+]
374 
375 Result fsOpenDataStorageByCurrentProcess(FsStorage* out);
376 Result fsOpenDataStorageByProgramId(FsStorage *out, u64 program_id); /// <[3.0.0+]
378 Result fsOpenPatchDataStorageByCurrentProcess(FsStorage* out);
379 
380 Result fsOpenDeviceOperator(FsDeviceOperator* out);
381 Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out);
382 
383 Result fsIsSignedSystemPartitionOnSdCardValid(bool *out);
384 
385 /// Retrieves the rights id corresponding to the content path. Only available on [2.0.0+].
386 Result fsGetRightsIdByPath(const char* path, FsRightsId* out_rights_id);
387 
388 /// Retrieves the rights id and key generation corresponding to the content path. Only available on [3.0.0+].
389 Result fsGetRightsIdAndKeyGenerationByPath(const char* path, u8* out_key_generation, FsRightsId* out_rights_id);
390 
391 Result fsDisableAutoSaveDataCreation(void);
392 
393 Result fsSetGlobalAccessLogMode(u32 mode);
394 Result fsGetGlobalAccessLogMode(u32* out_mode);
395 Result fsOutputAccessLogToSdCard(const char *log, size_t size);
396 
397 /// Only available on [7.0.0+].
398 Result fsGetProgramIndexForAccessLog(u32 *out_program_index, u32 *out_program_count);
399 
400 // Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
401 Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid, u64 owner_id, s64 size, s64 journal_size, u32 flags);
402 Result fsCreate_SystemSaveData(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, s64 size, s64 journal_size, u32 flags);
403 
404 /// Wrapper for fsOpenSaveDataFileSystem.
405 /// See \ref FsSaveDataAttribute for application_id and uid.
406 Result fsOpen_SaveData(FsFileSystem* out, u64 application_id, AccountUid uid);
407 
408 /// Wrapper for fsOpenReadOnlySaveDataFileSystem.
409 /// Only available on [2.0.0+].
410 /// See \ref FsSaveDataAttribute for application_id and uid.
411 Result fsOpen_SaveDataReadOnly(FsFileSystem* out, u64 application_id, AccountUid uid);
412 
413 /// Wrapper for fsOpenSaveDataFileSystem, for opening BcatSaveData.
414 Result fsOpen_BcatSaveData(FsFileSystem* out, u64 application_id);
415 
416 /// Wrapper for fsOpenSaveDataFileSystem, for opening DeviceSaveData.
417 /// See \ref FsSaveDataAttribute for application_id.
418 Result fsOpen_DeviceSaveData(FsFileSystem* out, u64 application_id);
419 
420 /// Wrapper for fsOpenSaveDataFileSystem, for opening TemporaryStorage.
421 /// Only available on [3.0.0+].
423 
424 /// Wrapper for fsOpenSaveDataFileSystem, for opening CacheStorage.
425 /// Only available on [3.0.0+].
426 /// See \ref FsSaveDataAttribute for application_id.
427 Result fsOpen_CacheStorage(FsFileSystem* out, u64 application_id, u16 save_data_index);
428 
429 /// Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId, for opening SystemSaveData.
430 /// WARNING: You can brick when writing to SystemSaveData, if the data is corrupted etc.
431 Result fsOpen_SystemSaveData(FsFileSystem* out, FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid);
432 
433 /// Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId, for opening SystemBcatSaveData.
434 /// Only available on [4.0.0+].
435 Result fsOpen_SystemBcatSaveData(FsFileSystem* out, u64 system_save_data_id);
436 
437 // IFileSystem
438 Result fsFsCreateFile(FsFileSystem* fs, const char* path, s64 size, u32 option);
439 Result fsFsDeleteFile(FsFileSystem* fs, const char* path);
440 Result fsFsCreateDirectory(FsFileSystem* fs, const char* path);
441 Result fsFsDeleteDirectory(FsFileSystem* fs, const char* path);
442 Result fsFsDeleteDirectoryRecursively(FsFileSystem* fs, const char* path);
443 Result fsFsRenameFile(FsFileSystem* fs, const char* cur_path, const char* new_path);
444 Result fsFsRenameDirectory(FsFileSystem* fs, const char* cur_path, const char* new_path);
445 Result fsFsGetEntryType(FsFileSystem* fs, const char* path, FsDirEntryType* out);
446 Result fsFsOpenFile(FsFileSystem* fs, const char* path, u32 mode, FsFile* out);
447 Result fsFsOpenDirectory(FsFileSystem* fs, const char* path, u32 mode, FsDir* out);
448 Result fsFsCommit(FsFileSystem* fs);
449 Result fsFsGetFreeSpace(FsFileSystem* fs, const char* path, s64* out);
450 Result fsFsGetTotalSpace(FsFileSystem* fs, const char* path, s64* out);
451 Result fsFsGetFileTimeStampRaw(FsFileSystem* fs, const char* path, FsTimeStampRaw *out); ///< [3.0.0+]
452 Result fsFsCleanDirectoryRecursively(FsFileSystem* fs, const char* path); ///< [3.0.0+]
453 Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void *in, size_t in_size, const char* path, FsFileSystemQueryId query_id); ///< [4.0.0+]
454 void fsFsClose(FsFileSystem* fs);
455 
456 /// Uses \ref fsFsQueryEntry to set the archive bit on the specified absolute directory path.
457 /// This will cause HOS to treat the directory as if it were a file containing the directory's concatenated contents.
459 
460 /// Wrapper for fsFsQueryEntry with FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard.
461 /// Only available on [8.0.0+].
463 
464 // IFile
465 Result fsFileRead(FsFile* f, s64 off, void* buf, u64 read_size, u32 option, u64* bytes_read);
466 Result fsFileWrite(FsFile* f, s64 off, const void* buf, u64 write_size, u32 option);
467 Result fsFileFlush(FsFile* f);
468 Result fsFileSetSize(FsFile* f, s64 sz);
469 Result fsFileGetSize(FsFile* f, s64* out);
470 Result fsFileOperateRange(FsFile* f, FsOperationId op_id, s64 off, s64 len, FsRangeInfo* out); ///< [4.0.0+]
471 void fsFileClose(FsFile* f);
472 
473 // IDirectory
474 Result fsDirRead(FsDir* d, s64* total_entries, size_t max_entries, FsDirectoryEntry *buf);
475 Result fsDirGetEntryCount(FsDir* d, s64* count);
476 void fsDirClose(FsDir* d);
477 
478 // IStorage
479 Result fsStorageRead(FsStorage* s, s64 off, void* buf, u64 read_size);
480 Result fsStorageWrite(FsStorage* s, s64 off, const void* buf, u64 write_size);
481 Result fsStorageFlush(FsStorage* s);
482 Result fsStorageSetSize(FsStorage* s, s64 sz);
483 Result fsStorageGetSize(FsStorage* s, s64* out);
484 Result fsStorageOperateRange(FsStorage* s, FsOperationId op_id, s64 off, s64 len, FsRangeInfo* out); ///< [4.0.0+]
485 void fsStorageClose(FsStorage* s);
486 
487 // ISaveDataInfoReader
488 
489 /// Read FsSaveDataInfo data into the buf array.
490 Result fsSaveDataInfoReaderRead(FsSaveDataInfoReader *s, FsSaveDataInfo* buf, size_t max_entries, s64* total_entries);
491 void fsSaveDataInfoReaderClose(FsSaveDataInfoReader *s);
492 
493 // IEventNotifier
494 Result fsEventNotifierGetEventHandle(FsEventNotifier* e, Event* out, bool autoclear);
495 void fsEventNotifierClose(FsEventNotifier* e);
496 
497 // IDeviceOperator
498 Result fsDeviceOperatorIsSdCardInserted(FsDeviceOperator* d, bool* out);
499 Result fsDeviceOperatorIsGameCardInserted(FsDeviceOperator* d, bool* out);
500 Result fsDeviceOperatorGetGameCardHandle(FsDeviceOperator* d, FsGameCardHandle* out);
501 Result fsDeviceOperatorGetGameCardAttribute(FsDeviceOperator* d, const FsGameCardHandle* handle, u8 *out);
502 void fsDeviceOperatorClose(FsDeviceOperator* d);
FsSaveDataRank_Secondary
@ FsSaveDataRank_Secondary
Secondary.
Definition: fs.h:218
FsSaveDataSpaceId_User
@ FsSaveDataSpaceId_User
User.
Definition: fs.h:194
s64
int64_t s64
64-bit signed integer.
Definition: types.h:28
FsTimeStampRaw::created
u64 created
POSIX timestamp.
Definition: fs.h:126
FsSaveDataSpaceId_SafeMode
@ FsSaveDataSpaceId_SafeMode
[3.0.0+] SafeMode
Definition: fs.h:199
FsArchiveMacKey
This is nn::fssystem::ArchiveMacKey. Used by setsysGetThemeKey and setsysSetThemeKey....
Definition: fs.h:134
FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard
@ FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard
[8.0.0+]
Definition: fs.h:305
FsSaveDataSpaceId_SdSystem
@ FsSaveDataSpaceId_SdSystem
SdSystem.
Definition: fs.h:195
FsRightsId
Definition: fs.h:23
FsGameCardPartition
FsGameCardPartition
Definition: fs.h:244
FsSaveDataAttribute::unk_x38
u64 unk_x38
0 for FsSaveDataType_System/FsSaveDataType_Account.
Definition: fs.h:75
FsFileSystemType_RegisteredUpdate
@ FsFileSystemType_RegisteredUpdate
[4.0.0+] RegisteredUpdate
Definition: fs.h:299
FsSaveDataInfo::system_save_data_id
u64 system_save_data_id
FsSaveDataAttribute::system_save_data_id.
Definition: fs.h:117
fsSaveDataInfoReaderRead
Result fsSaveDataInfoReaderRead(FsSaveDataInfoReader *s, FsSaveDataInfo *buf, size_t max_entries, s64 *total_entries)
Read FsSaveDataInfo data into the buf array.
FsFile
Definition: fs.h:31
NcmStorageId
NcmStorageId
StorageId.
Definition: ncm_types.h:12
fsOpen_TemporaryStorage
Result fsOpen_TemporaryStorage(FsFileSystem *out)
Wrapper for fsOpenSaveDataFileSystem, for opening TemporaryStorage.
FsSaveDataAttribute::unk_x30
u64 unk_x30
0 for FsSaveDataType_System/FsSaveDataType_Account.
Definition: fs.h:74
fsOpenHostFileSystemWithOption
Result fsOpenHostFileSystemWithOption(FsFileSystem *out, const char *path, u32 flags)
[9.0.0+]
FsMountHostOptionFlag_None
@ FsMountHostOptionFlag_None
Host filesystem will be case insensitive.
Definition: fs.h:318
FsDirEntryType
FsDirEntryType
Returned by fsFsGetEntryType.
Definition: fs.h:139
FsSaveDataAttribute::unk_x28
u64 unk_x28
0 for FsSaveDataType_System/FsSaveDataType_Account.
Definition: fs.h:73
fsFsCleanDirectoryRecursively
Result fsFsCleanDirectoryRecursively(FsFileSystem *fs, const char *path)
[3.0.0+]
FsSaveDataType_Bcat
@ FsSaveDataType_Bcat
Bcat.
Definition: fs.h:208
FsSaveDataExtraData::flags
u32 flags
FsSaveDataFlags
Definition: fs.h:83
FsSaveDataInfo::save_data_type
u8 save_data_type
FsSaveDataType
Definition: fs.h:114
FsSaveDataAttribute
SaveDataAttribute.
Definition: fs.h:65
FsOperationId_ClearSignature
@ FsOperationId_ClearSignature
Clears signature for supported file/storage.
Definition: fs.h:263
u8
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
FsDirectoryEntry::type
s8 type
See FsDirEntryType.
Definition: fs.h:59
fsOpenSdCardFileSystem
Result fsOpenSdCardFileSystem(FsFileSystem *out)
Do not call this directly, see fs_dev.h.
FsOperationId_InvalidateCache
@ FsOperationId_InvalidateCache
Invalidates cache for supported file/storage.
Definition: fs.h:264
Event
Kernel-mode event structure.
Definition: event.h:13
FsSaveDataInfoReader
Definition: fs.h:43
FsSaveDataSpaceId_System
@ FsSaveDataSpaceId_System
System.
Definition: fs.h:193
fsOpen_SystemSaveData
Result fsOpen_SystemSaveData(FsFileSystem *out, FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid)
Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId, for opening SystemSaveData.
FsSaveDataCreationInfo::save_data_space_id
u8 save_data_space_id
FsSaveDataSpaceId
Definition: fs.h:105
FsFileSystemType_ApplicationPackage
@ FsFileSystemType_ApplicationPackage
ApplicationPackage.
Definition: fs.h:298
fsFileOperateRange
Result fsFileOperateRange(FsFile *f, FsOperationId op_id, s64 off, s64 len, FsRangeInfo *out)
[4.0.0+]
FsSaveDataFlags
FsSaveDataFlags
SaveDataFlags.
Definition: fs.h:222
FsSaveDataSpaceId_SdUser
@ FsSaveDataSpaceId_SdUser
[4.0.0+] SdUser
Definition: fs.h:197
FsSaveDataInfo::uid
AccountUid uid
FsSave::userID.
Definition: fs.h:116
FsTimeStampRaw
Definition: fs.h:125
FsGameCardAttribute_HistoryEraseFlag
@ FsGameCardAttribute_HistoryEraseFlag
Causes NS to throw an error on attempt to load the cartridge.
Definition: fs.h:238
fsSetPriority
void fsSetPriority(FsPriority prio)
[5.0.0+] Configures the FsPriority of all filesystem commands issued within the current thread.
AccountUid
Account UserId.
Definition: acc.h:25
FsMountHostOptionFlag_PseudoCaseSensitive
@ FsMountHostOptionFlag_PseudoCaseSensitive
Host filesystem will be pseudo case sensitive.
Definition: fs.h:319
fsOpenFileSystemWithPatch
Result fsOpenFileSystemWithPatch(FsFileSystem *out, u64 id, FsFileSystemType fsType)
[2.0.0+], like OpenFileSystemWithId but without content path.
FsSaveDataSpaceId_Temporary
@ FsSaveDataSpaceId_Temporary
[3.0.0+] Temporary
Definition: fs.h:196
fsOpen_CacheStorage
Result fsOpen_CacheStorage(FsFileSystem *out, u64 application_id, u16 save_data_index)
Wrapper for fsOpenSaveDataFileSystem, for opening CacheStorage.
FsSaveDataInfo::save_data_index
u16 save_data_index
SaveDataIndex.
Definition: fs.h:120
FsOpenMode
FsOpenMode
For use with fsFsOpenFile.
Definition: fs.h:145
FsFileSystemType
FsFileSystemType
FileSystemType.
Definition: fs.h:292
FsSaveDataExtraData::data_size
s64 data_size
Usable save data size.
Definition: fs.h:85
FsRangeInfo
Definition: fs.h:255
FsSaveDataInfo::save_data_id
u64 save_data_id
SaveDataId.
Definition: fs.h:112
FsSaveDataCreationInfo::available_size
u64 available_size
AvailableSize.
Definition: fs.h:102
FsSaveDataCreationInfo::save_data_size
s64 save_data_size
Size of the save data.
Definition: fs.h:100
fsOpenCustomStorageFileSystem
Result fsOpenCustomStorageFileSystem(FsFileSystem *out, FsCustomStorageId custom_storage_id)
[7.0.0+]
FsDirOpenMode_ReadFiles
@ FsDirOpenMode_ReadFiles
Enable reading file entries.
Definition: fs.h:159
fsOpen_BcatSaveData
Result fsOpen_BcatSaveData(FsFileSystem *out, u64 application_id)
Wrapper for fsOpenSaveDataFileSystem, for opening BcatSaveData.
FsSaveDataCreationInfo
SaveDataCreationInfo.
Definition: fs.h:99
FsSaveDataCreationInfo::journal_size
s64 journal_size
Journal size of the save data.
Definition: fs.h:101
fsInitialize
Result fsInitialize(void)
Initialize fsp-srv. Used automatically during app startup.
FsSaveDataType_Cache
@ FsSaveDataType_Cache
[3.0.0+] Cache
Definition: fs.h:211
FsEventNotifier
Definition: fs.h:47
FsOpenMode_Write
@ FsOpenMode_Write
Open for writing.
Definition: fs.h:147
FsSaveDataSpaceId
FsSaveDataSpaceId
SaveDataSpaceId.
Definition: fs.h:192
FsCreateOption_BigFile
@ FsCreateOption_BigFile
Creates a ConcatenationFile (dir with archive bit) instead of file.
Definition: fs.h:153
FsOperationId_QueryRange
@ FsOperationId_QueryRange
Retrieves information on data for supported file/storage.
Definition: fs.h:265
FsReadOption
FsReadOption
For use with fsFileRead.
Definition: fs.h:164
FsSaveDataMetaInfo
SaveDataMetaInfo.
Definition: fs.h:92
fsOpenFileSystemWithId
Result fsOpenFileSystemWithId(FsFileSystem *out, u64 id, FsFileSystemType fsType, const char *contentPath)
works on all firmwares, id is ignored on [1.0.0]
FsTimeStampRaw::is_valid
u8 is_valid
0x1 when the timestamps are set.
Definition: fs.h:129
FsSaveDataExtraData::journal_size
s64 journal_size
Journal size of the save data.
Definition: fs.h:86
FsReadOption_None
@ FsReadOption_None
No option.
Definition: fs.h:165
FsSaveDataAttribute::pad_x24
u32 pad_x24
Padding.
Definition: fs.h:72
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
FsSaveDataInfo
SaveDataInfo.
Definition: fs.h:111
FsGameCardHandle
Definition: fs.h:251
FsSaveDataCreationInfo::unk
u8 unk
0 for FsSaveDataType_System.
Definition: fs.h:106
FsFileSystemQueryId
FsFileSystemQueryId
FileSystemQueryId.
Definition: fs.h:303
fsOpen_SystemBcatSaveData
Result fsOpen_SystemBcatSaveData(FsFileSystem *out, u64 system_save_data_id)
Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId, for opening SystemBcatSaveData.
FsSaveDataExtraData::commit_id
u64 commit_id
Id of the latest commit.
Definition: fs.h:87
FsStorage
Definition: fs.h:39
s8
int8_t s8
8-bit signed integer.
Definition: types.h:25
FsGameCardAttribute_AutoBootFlag
@ FsGameCardAttribute_AutoBootFlag
Causes the cartridge to automatically start on bootup.
Definition: fs.h:237
fsOpenReadOnlySaveDataFileSystem
Result fsOpenReadOnlySaveDataFileSystem(FsFileSystem *out, FsSaveDataSpaceId save_data_space_id, const FsSaveDataAttribute *attr)
[2.0.0+].
FsFileSystemType_ContentMeta
@ FsFileSystemType_ContentMeta
ContentMeta.
Definition: fs.h:296
fsOpen_SaveDataReadOnly
Result fsOpen_SaveDataReadOnly(FsFileSystem *out, u64 application_id, AccountUid uid)
Wrapper for fsOpenReadOnlySaveDataFileSystem.
FsSaveDataInfo::save_data_space_id
u8 save_data_space_id
FsSaveDataSpaceId
Definition: fs.h:113
FsSaveDataAttribute::system_save_data_id
u64 system_save_data_id
SystemSaveDataId, 0 for FsSaveDataType_Account.
Definition: fs.h:68
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
fsGetRightsIdAndKeyGenerationByPath
Result fsGetRightsIdAndKeyGenerationByPath(const char *path, u8 *out_key_generation, FsRightsId *out_rights_id)
Retrieves the rights id and key generation corresponding to the content path. Only available on [3....
FsOpenMode_Read
@ FsOpenMode_Read
Open for reading.
Definition: fs.h:146
FsGameCardAttribute_DifferentRegionCupToTerraDeviceFlag
@ FsGameCardAttribute_DifferentRegionCupToTerraDeviceFlag
[9.0.0+] DifferentRegionCupToTerraDeviceFlag
Definition: fs.h:240
fsOpen_DeviceSaveData
Result fsOpen_DeviceSaveData(FsFileSystem *out, u64 application_id)
Wrapper for fsOpenSaveDataFileSystem, for opening DeviceSaveData.
FsSaveDataType_System
@ FsSaveDataType_System
System.
Definition: fs.h:206
FsGameCardAttribute
FsGameCardAttribute
Definition: fs.h:236
FsDirEntryType_File
@ FsDirEntryType_File
Entry is a file.
Definition: fs.h:141
FsSaveDataRank
FsSaveDataRank
SaveDataRank.
Definition: fs.h:216
FsSaveDataAttribute::save_data_type
u8 save_data_type
FsSaveDataType
Definition: fs.h:69
Result
u32 Result
Function error code result type.
Definition: types.h:44
FsFileSystemQueryId_SetConcatenationFileAttribute
@ FsFileSystemQueryId_SetConcatenationFileAttribute
[4.0.0+]
Definition: fs.h:304
FsWriteOption_Flush
@ FsWriteOption_Flush
Forces a flush after write.
Definition: fs.h:171
FsDirEntryType_Dir
@ FsDirEntryType_Dir
Entry is a directory.
Definition: fs.h:140
FsSaveDataInfo::size
u64 size
Raw saveimage size.
Definition: fs.h:119
FsSaveDataExtraData::owner_id
u64 owner_id
ProgramId of the owner of this save data. 0 for FsSaveDataType_System.
Definition: fs.h:81
FsOperationId
FsOperationId
Definition: fs.h:261
FsDirOpenMode
FsDirOpenMode
For use with fsFsOpenDirectory.
Definition: fs.h:157
fsOpenFileSystem
Result fsOpenFileSystem(FsFileSystem *out, FsFileSystemType fsType, const char *contentPath)
Mount requested filesystem type from content file.
FsTimeStampRaw::accessed
u64 accessed
POSIX timestamp.
Definition: fs.h:128
FsSaveDataCreationInfo::owner_id
u64 owner_id
ProgramId of the owner of this save data. 0 for FsSaveDataType_System.
Definition: fs.h:103
FsPriority
FsPriority
FsPriority.
Definition: fs.h:309
FsSaveDataAttribute::save_data_rank
u8 save_data_rank
FsSaveDataRank
Definition: fs.h:70
FsSaveDataMetaInfo::type
u8 type
FsSaveDataMetaType
Definition: fs.h:94
FsDirectoryEntry
Directory entry.
Definition: fs.h:56
fsDeleteSaveDataFileSystemBySaveDataSpaceId
Result fsDeleteSaveDataFileSystemBySaveDataSpaceId(FsSaveDataSpaceId save_data_space_id, u64 saveID)
[2.0.0+]
FsDirOpenMode_ReadDirs
@ FsDirOpenMode_ReadDirs
Enable reading directory entries.
Definition: fs.h:158
FsFileSystemType_ContentManual
@ FsFileSystemType_ContentManual
ContentManual.
Definition: fs.h:295
FsMountHostOption
FsMountHostOption
For use with fsOpenHostFileSystemWithOption.
Definition: fs.h:317
FsDir
Definition: fs.h:35
fsStorageOperateRange
Result fsStorageOperateRange(FsStorage *s, FsOperationId op_id, s64 off, s64 len, FsRangeInfo *out)
[4.0.0+]
FsTimeStampRaw::modified
u64 modified
POSIX timestamp.
Definition: fs.h:127
FsRangeInfo::speed_emulation_type
u32 speed_emulation_type
Contains bitflags describing how data is emulated.
Definition: fs.h:257
fsDeleteSaveDataFileSystemBySaveDataAttribute
Result fsDeleteSaveDataFileSystemBySaveDataAttribute(FsSaveDataSpaceId save_data_space_id, const FsSaveDataAttribute *attr)
[4.0.0+]
FsFileSystemType_ContentData
@ FsFileSystemType_ContentData
ContentData.
Definition: fs.h:297
fsFsGetFileTimeStampRaw
Result fsFsGetFileTimeStampRaw(FsFileSystem *fs, const char *path, FsTimeStampRaw *out)
[3.0.0+]
FsSaveDataMetaType
FsSaveDataMetaType
SaveDataMetaType.
Definition: fs.h:230
FsGameCardPartition_Logo
@ FsGameCardPartition_Logo
[4.0.0+]
Definition: fs.h:248
FsDirectoryEntry::file_size
s64 file_size
File size.
Definition: fs.h:61
FsWriteOption_None
@ FsWriteOption_None
No option.
Definition: fs.h:170
FsDeviceOperator
Definition: fs.h:51
fsExit
void fsExit(void)
Exit fsp-srv. Used automatically during app exit.
FsSaveDataType_Device
@ FsSaveDataType_Device
Device.
Definition: fs.h:209
fsOpen_SaveData
Result fsOpen_SaveData(FsFileSystem *out, u64 application_id, AccountUid uid)
Wrapper for fsOpenSaveDataFileSystem.
fsGetProgramIndexForAccessLog
Result fsGetProgramIndexForAccessLog(u32 *out_program_index, u32 *out_program_count)
Only available on [7.0.0+].
fsOpenDataStorageByDataId
Result fsOpenDataStorageByDataId(FsStorage *out, u64 dataId, NcmStorageId storageId)
<[3.0.0+]
fsFsQueryEntry
Result fsFsQueryEntry(FsFileSystem *fs, void *out, size_t out_size, const void *in, size_t in_size, const char *path, FsFileSystemQueryId query_id)
[4.0.0+]
FsSaveDataAttribute::save_data_index
u16 save_data_index
SaveDataIndex.
Definition: fs.h:71
fsExtendSaveDataFileSystem
Result fsExtendSaveDataFileSystem(FsSaveDataSpaceId save_data_space_id, u64 saveID, s64 dataSize, s64 journalSize)
[3.0.0+]
FsFileSystemType_ContentControl
@ FsFileSystemType_ContentControl
ContentControl.
Definition: fs.h:294
fsFsSetConcatenationFileAttribute
Result fsFsSetConcatenationFileAttribute(FsFileSystem *fs, const char *path)
Uses fsFsQueryEntry to set the archive bit on the specified absolute directory path.
FsOpenMode_Append
@ FsOpenMode_Append
Append file.
Definition: fs.h:148
FsSaveDataType_Account
@ FsSaveDataType_Account
Account.
Definition: fs.h:207
FsFileSystem
Definition: fs.h:27
FsSaveDataType_Temporary
@ FsSaveDataType_Temporary
[3.0.0+] Temporary
Definition: fs.h:210
FsSaveDataType_SystemBcat
@ FsSaveDataType_SystemBcat
[4.0.0+] SystemBcat
Definition: fs.h:212
FsDirOpenMode_NoFileSize
@ FsDirOpenMode_NoFileSize
Causes result entries to not contain filesize information (always 0).
Definition: fs.h:160
FsGameCardAttribute_RepairToolFlag
@ FsGameCardAttribute_RepairToolFlag
[4.0.0+] Indicates that this gamecard is a repair tool.
Definition: fs.h:239
FsSaveDataCreationInfo::flags
u32 flags
FsSaveDataFlags
Definition: fs.h:104
BIT
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:54
Service
Service object structure.
Definition: service.h:13
FsSaveDataInfo::application_id
u64 application_id
ApplicationId for FsSaveDataType_Account.
Definition: fs.h:118
FsImageDirectoryId
FsImageDirectoryId
ImageDirectoryId.
Definition: fs.h:186
fsFsIsValidSignedSystemPartitionOnSdCard
Result fsFsIsValidSignedSystemPartitionOnSdCard(FsFileSystem *fs, bool *out)
Wrapper for fsFsQueryEntry with FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard.
FsSaveDataExtraData
SaveDataExtraData.
Definition: fs.h:79
FsFileSystemType_Logo
@ FsFileSystemType_Logo
Logo.
Definition: fs.h:293
FsSaveDataExtraData::attr
FsSaveDataAttribute attr
FsSaveDataAttribute
Definition: fs.h:80
FsSaveDataSpaceId_All
@ FsSaveDataSpaceId_All
Pseudo value for fsOpenSaveDataInfoReader().
Definition: fs.h:201
FsSaveDataAttribute::uid
AccountUid uid
AccountUid for the user-specific savedata to access, otherwise 0 for common savedata.
Definition: fs.h:67
FsGameCardAttribute_DifferentRegionCupToGlobalDeviceFlag
@ FsGameCardAttribute_DifferentRegionCupToGlobalDeviceFlag
[9.0.0+] DifferentRegionCupToGlobalDeviceFlag
Definition: fs.h:241
FsSaveDataInfo::save_data_rank
u8 save_data_rank
FsSaveDataRank
Definition: fs.h:121
fsGetRightsIdByPath
Result fsGetRightsIdByPath(const char *path, FsRightsId *out_rights_id)
Retrieves the rights id corresponding to the content path. Only available on [2.0....
fsGetServiceSession
Service * fsGetServiceSession(void)
Gets the Service object for the actual fsp-srv service session.
FsSaveDataAttribute::application_id
u64 application_id
ApplicationId of the savedata to access when accessing other programs' savedata via SaveData,...
Definition: fs.h:66
FsSaveDataExtraData::unk_x54
u32 unk_x54
Normally 0. Possibly unused?
Definition: fs.h:84
FsSaveDataRank_Primary
@ FsSaveDataRank_Primary
Primary.
Definition: fs.h:217
FsSaveDataExtraData::timestamp
u64 timestamp
POSIX timestamp.
Definition: fs.h:82
FsSaveDataType
FsSaveDataType
SaveDataType.
Definition: fs.h:205
FsOperationId_Clear
@ FsOperationId_Clear
Fill range with zero for supported file/storage.
Definition: fs.h:262
u16
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
FsBisPartitionId
FsBisPartitionId
BisPartitionId.
Definition: fs.h:269
FsWriteOption
FsWriteOption
For use with fsFileWrite.
Definition: fs.h:169
fsOpenDataFileSystemByProgramId
Result fsOpenDataFileSystemByProgramId(FsFileSystem *out, u64 program_id)
[3.0.0+]
FsSaveDataSpaceId_ProperSystem
@ FsSaveDataSpaceId_ProperSystem
[3.0.0+] ProperSystem
Definition: fs.h:198
FsCreateOption
FsCreateOption
For use with fsFsCreateFile.
Definition: fs.h:152
FsRangeInfo::aes_ctr_key_type
u32 aes_ctr_key_type
Contains bitflags describing how data is AES encrypted.
Definition: fs.h:256