|
|
@ -1,7 +1,7 @@ |
|
|
|
//! Filesystem service
|
|
|
|
//! Filesystem service
|
|
|
|
//!
|
|
|
|
//!
|
|
|
|
//! This module contains basic methods to manipulate the contents of the 3DS's filesystem.
|
|
|
|
//! This module contains basic methods to manipulate the contents of the 3DS's filesystem.
|
|
|
|
//! Only the SD card is currently supported.
|
|
|
|
//! Only the SD card is currently supported. You should prefer using `std::fs`.
|
|
|
|
|
|
|
|
|
|
|
|
use bitflags::bitflags; |
|
|
|
use bitflags::bitflags; |
|
|
|
use std::ffi::OsString; |
|
|
|
use std::ffi::OsString; |
|
|
@ -52,38 +52,40 @@ pub enum FsMediaType { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Copy, Clone, Debug)] |
|
|
|
#[derive(Copy, Clone, Debug)] |
|
|
|
|
|
|
|
#[repr(u32)] |
|
|
|
pub enum PathType { |
|
|
|
pub enum PathType { |
|
|
|
Invalid, |
|
|
|
Invalid = ctru_sys::PATH_INVALID, |
|
|
|
Empty, |
|
|
|
Empty = ctru_sys::PATH_EMPTY, |
|
|
|
Binary, |
|
|
|
Binary = ctru_sys::PATH_BINARY, |
|
|
|
ASCII, |
|
|
|
ASCII = ctru_sys::PATH_ASCII, |
|
|
|
UTF16, |
|
|
|
UTF16 = ctru_sys::PATH_UTF16, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Copy, Clone, Debug)] |
|
|
|
#[derive(Copy, Clone, Debug)] |
|
|
|
|
|
|
|
#[repr(u32)] |
|
|
|
pub enum ArchiveID { |
|
|
|
pub enum ArchiveID { |
|
|
|
RomFS, |
|
|
|
RomFS = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
Savedata, |
|
|
|
Savedata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
Extdata, |
|
|
|
Extdata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
SharedExtdata, |
|
|
|
SharedExtdata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
SystemSavedata, |
|
|
|
SystemSavedata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
Sdmc, |
|
|
|
Sdmc = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
SdmcWriteOnly, |
|
|
|
SdmcWriteOnly = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
BossExtdata, |
|
|
|
BossExtdata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
CardSpiFS, |
|
|
|
CardSpiFS = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
ExtDataAndBossExtdata, |
|
|
|
ExtDataAndBossExtdata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
SystemSaveData2, |
|
|
|
SystemSaveData2 = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
NandRW, |
|
|
|
NandRW = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
NandRO, |
|
|
|
NandRO = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
NandROWriteAccess, |
|
|
|
NandROWriteAccess = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
SaveDataAndContent, |
|
|
|
SaveDataAndContent = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
SaveDataAndContent2, |
|
|
|
SaveDataAndContent2 = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
NandCtrFS, |
|
|
|
NandCtrFS = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
TwlPhoto, |
|
|
|
TwlPhoto = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
NandTwlFS, |
|
|
|
NandTwlFS = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
GameCardSavedata, |
|
|
|
GameCardSavedata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
UserSavedata, |
|
|
|
UserSavedata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
DemoSavedata, |
|
|
|
DemoSavedata = ctru_sys::ARCHIVE_ROMFS, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Represents the filesystem service. No file IO can be performed
|
|
|
|
/// Represents the filesystem service. No file IO can be performed
|
|
|
|