summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-07-29partition_filesystem: Remove dynamic_cast in PrintDebugInfo()Lioncash1-3/+2
We shouldn't be upcasting our file instances. Given a PartitionFilesystem is currently designed to accept any arbitrary VfsFile instances, casting to a more specific type than that is just bad design, and shows an interface design issue.
2018-07-28RomFS ExtractionZach Hilman11-20/+347
2018-07-24VFS Regression and Accuracy Fixes (#776)Zach Hilman2-20/+33
* Regression and Mode Fixes * Review Fixes * string_view correction * Add operator& for FileSys::Mode * Return std::string from SanitizePath * Farming Simulator Fix * Use != With mode operator&
2018-07-24partition_filesystem: Use std::move where applicableLioncash1-3/+3
Avoids copying a std::string instance and avoids unnecessary atomic reference count incrementing and decrementing.
2018-07-23NRO Assets and NACP file formatZach Hilman2-0/+123
Cleanup Review fixes
2018-07-22vfs: Correct file_p variable usage within InterpretAsDirectory()Lioncash1-2/+5
ReplaceFileWithSubdirectory() takes a VirtualFile and a VirtualDir, but it was being passed a string as one of its arguments. The only reason this never caused issues is because this template isn't instantiated anywhere yet. This corrects an issue before it occurs.
2018-07-22file_util, vfs: Use std::string_view where applicableLioncash6-89/+150
Avoids unnecessary construction of std::string instances where applicable.
2018-07-22file_util: Use a u64 to represent number of entriesLioncash1-3/+3
This avoids a truncating cast on size. I doubt we'd ever traverse a directory this large, however we also shouldn't truncate sizes away.
2018-07-21file_sys/errors: Remove redundant object constructor callsLioncash1-8/+8
Given we're already constructing the error code, we don't need to call the constructor inside of it.
2018-07-21vfs_real: Remove redundant copying of std::vector instances in GetFiles() and GetSubdirectories()Lioncash1-2/+3
We already return by value, so we don't explicitly need to make the copy.
2018-07-21partition_filesystem, vfs_real: Add missing standard includesLioncash2-0/+4
2018-07-21partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicableLioncash2-2/+3
Avoids unnecessary atomic increment and decrement operations.
2018-07-21partition_filesystem, vfs_real: Use std::distance() instead of subtractionLioncash2-4/+10
This is a little bit more self-documenting on what is being done here.
2018-07-21vfs_offset: Simplify TrimToFit()Lioncash1-1/+2
We can simply use std::clamp() here, instead of using an equivalent with std::max() and std::min().
2018-07-21vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by const referenceLioncash4-4/+4
Given the data is intended to be directly written, there's no need to take the std::vector by value and copy the data.
2018-07-21vfs: Use variable template variants of std::is_trivially_copyableLioncash1-13/+6
Provides the same behavior, but with less writing
2018-07-21vfs: Amend constness on pointers in WriteBytes() and WriteArrays() member functions to be const qualifiedLioncash1-3/+3
These functions don't modify the data being pointed to, so these can be pointers to const data
2018-07-20vfs_offset: std::move file and name parameters of OffsetVfsFileLioncash2-3/+5
Avoids potentially unnecessary atomic reference count incrementing and decrementing, as well as string copying.
2018-07-20partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()Lioncash1-1/+1
This should be returned here, otherwise pfs_dirs is effectively only ever added to, but never read.
2018-07-19savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member functionLioncash2-2/+2
This function doesn't alter class state.
2018-07-19partition_filesystem: Ensure all class members of PartitionFilesystem are initializedLioncash2-24/+15
Previously is_hfs and pfs_header members wouldn't be initialized in the constructor, as they were stored in locals instead. This would result in things like GetName() and PrintDebugInfo() behaving incorrectly. While we're at it, initialize the members to deterministic values as well, in case loading ever fails.
2018-07-19content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const referenceLioncash1-1/+1
There's no need to take this by value when it's possible to avoid unnecessary copies entirely like this.
2018-07-19content_archive: Add missing standard includesLioncash1-0/+5
2018-07-19content_archive: std::move VirtualFile in NCA's constructorLioncash1-1/+4
Gets rid of unnecessary atomic reference count incrementing and decrementing.
2018-07-19vfs: Deduplicate accumulation code in VfsDirectory's GetSize()Lioncash1-6/+6
We can just use a generic lambda to avoid writing the same thing twice.
2018-07-19Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman30-1211/+1267
* Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
2018-07-17General Filesystem and Save Data Fixes (#670)Zach Hilman8-106/+123
2018-07-14FileSys: Append the requested path to the filesystem base path in DeleteFile.Subv1-2/+4
We were trying to delete things in the current directory instead of the actual filesystem directory. This may fix some savedata issues in some games.
2018-07-08savedata_factory: Always create a save directory for games.bunnei1-0/+9
2018-07-08Revert "Virtual Filesystem (#597)"bunnei23-1127/+996
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
2018-07-06Virtual Filesystem (#597)Zach Hilman23-996/+1127
* Add VfsFile and VfsDirectory classes * Finish abstract Vfs classes * Implement RealVfsFile (computer fs backend) * Finish RealVfsFile and RealVfsDirectory * Finished OffsetVfsFile * More changes * Fix import paths * Major refactor * Remove double const * Use experimental/filesystem or filesystem depending on compiler * Port partition_filesystem * More changes * More Overhaul * FSP_SRV fixes * Fixes and testing * Try to get filesystem to compile * Filesystem on linux * Remove std::filesystem and document/test * Compile fixes * Missing include * Bug fixes * Fixes * Rename v_file and v_dir * clang-format fix * Rename NGLOG_* to LOG_* * Most review changes * Fix TODO * Guess 'main' to be Directory by filename
2018-07-03Update clang formatJames Rowe3-10/+8
2018-07-03Rename logging macro back to LOG_*James Rowe8-55/+55
2018-06-21Add support for decrypted NCA files (#567)Zach Hilman2-4/+16
* Start to add NCA support in loader * More nca stuff * More changes to nca.cpp * Now identifies decrypted NCA cont. * Game list fixes and more structs and stuff * More updates to Nca class * Now reads ExeFs (i think) * ACTUALLY LOADS EXEFS! * RomFS loads and games execute * Cleanup and Finalize * plumbing, cleanup and testing * fix some things that i didnt think of before * Preliminary Review Changes * Review changes for bunnei and subv
2018-06-20Build: Fixed some MSVC warnings in various parts of the code.Subv2-6/+6
2018-06-19Services/FS: Return the correct error code when trying to mount a nonexistent savedata.Subv1-0/+1
2018-05-02general: Make formatting of logged hex values more straightforwardLioncash1-9/+9
This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
2018-04-25file-sys: convert a StringFromFormat call into fmt::format in GetFullPath()Lioncash1-4/+1
Lessens the amount to read and gets rid of the PRIX64 macro, allowing us to use a single string for the whole path, making it easier to read.
2018-04-25file-sys: Move logging macros over to the new fmt-capable onesLioncash8-64/+58
2018-04-24Service/FS: implement IFileSystem::RenameFilemailwl5-7/+15
2018-04-20disk_filesystem: Remove unused total_entries_in_directory member from Disk_DirectoryLioncash1-1/+0
2018-04-20disk_filesystem: Remove redundant initializer in Disk_Directory's constructorLioncash1-1/+1
2018-04-20disk_filesystem: Make constructors explicit where applicableLioncash1-2/+2
2018-04-17file_sys: Use NGLOGshinyquagsire231-5/+5
2018-04-16file_sys: tweaksshinyquagsire232-6/+7
2018-04-16file_sys: Add HFS/PFS helper componentshinyquagsire232-0/+211
2018-04-15fsp_srv: Implement DeleteFile.bunnei5-8/+12
- Used by Binding of Isaac.
2018-03-31fsp_srv: Implement GetSize and SetSize.bunnei1-2/+3
2018-03-23FS: Move the file open mode calculation to a separate function.Subv1-7/+14
2018-03-21FS: Implemented IFileSystem::CreateDirectory.Subv5-7/+14
2018-03-20FS: Implement DiskFileSystem's OpenDirectory interface.Subv5-6/+19
2018-03-20FS: Implement DiskFileSystem::GetEntryType for existing files/directories.Subv1-2/+4
2018-03-20FS: Updated the Directory Entry structure to match the Switch.Subv5-30/+84
2018-03-20FS: Support the file Append open mode.Subv2-2/+23
2018-03-20FS: Added an SDMC archive factory and registered it to the SDMC archive on startup.Subv2-0/+71
2018-03-14core: Move process creation out of global state.bunnei1-1/+2
2018-03-04FS: Use the correct error code when trying to open files that don't exist.Subv2-26/+6
2018-03-04FS: Make EnsureSaveData create the savedata folder when called for the first time.Subv5-15/+30
2018-03-02SaveData: Use the current titleid when opening the savedata archive.Subv1-2/+3
2018-03-02Filesystem: Added a SaveData Factory and associated Disk_FileSystem.Subv7-14/+315
2018-02-26file_sys: Style tweaksshinyquagsire232-11/+5
Asdf
2018-02-25file_sys: Add support for parsing NPDM filesshinyquagsire232-0/+274
2018-01-21file_sys: Clang format fixes.bunnei3-4/+4
2018-01-21file_sys: Cleanup to better match Switch file system constructs.bunnei9-57/+128
file_sys: Add factory class for RomFS file system.
2018-01-21file_sys: Remove disk_archive, savedata_archive, and title_metadata.bunnei6-829/+0
2018-01-21archive_backend: Minor changes to match Switch IFileSystem.bunnei5-26/+26
2018-01-21file_sys: Repurpose 3DS IVFC code for Switch ROMFS.bunnei2-49/+41
2018-01-21Format: Run the new clang format on everythingJames Rowe1-1/+1
2018-01-17Update title_metadata.hN00byKing1-0/+1
2018-01-13core: Gut out cryptop, since it doesn't compile with C++17.bunnei1-50/+1
2017-11-01hle: Use Switch formatted result codes.bunnei3-74/+24
2017-10-15core: Refactor MakeMagic usage and remove dead code.bunnei2-697/+0
2017-10-13Remove lots more 3DS-specific code.bunnei18-1935/+0
2017-10-01file_sys, loader: add support for reading TMDs to determine app pathsshinyquagsire231-2/+13
2017-10-01file_sys: add class for Title Metadata (TMD)shinyquagsire232-0/+337
2017-10-01file_sys/ncch_container: add RomFS, ExeFS override to allow for backward compatibility with existing .romfs system archive dumpsshinyquagsire232-69/+206
2017-10-01file_sys/archive_ncch: use NCCHContainer instead of loading .romfs filesshinyquagsire231-6/+12
2017-09-30nso: Refactor and allocate .bss section.bunnei1-3/+6
2017-09-25HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.Subv2-13/+39
The loaders now register each loaded ROM with the SelfNCCH factory, which keeps the data around for the duration of the emulation session. When opening the SelfNCCH archive, the factory queries the current program's programid and uses that as a key to the map that contains the NCCHData structure (RomFS, Icon, Banner, etc). 3dsx files do not have a programid and will use a default of 0 for this value, thus, only 1 3dsx file with RomFS is loadable at the same time.
2017-09-25Loader/NCCH: Add support for loading application updates (#2927)Max Thomas4-5/+587
* loader/ncch: split NCCH parsing into its own file * loader/ncch: add support for loading update NCCHs from the SD card * loader/ncch: fix formatting * file_sys/ncch_container: Return a value for OpenFile * loader/ncch: cleanup, always instantiate overlay_ncch to base_ncch * file_sys/ncch_container: better encryption checks, allow non-app NCCHs to load properly and for the existence of NCCH structures to be checked * file_sys/ncch_container: pass filepath as a const reference
2017-08-21Warnings: Add UNREACHABLE macros to switches that contemplate all possible values.Subv1-0/+2
2017-07-31Handle invalid filenames when renaming files/directoriesJames2-4/+78
2017-06-03Addressed Bunnei's review comments, and made some other tweaks:TheKoopaKingdom1-6/+6
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System. - Fixed design flaw where the message bar status could be set despite the game being stopped.
2017-06-03Switched to the ERROR_NOT_FOUND constant from errors.h.TheKoopaKingdom1-2/+2
2017-06-03Moved whitelist checks from FS_User to the Archive_NCCH handler.TheKoopaKingdom1-1/+35
2017-06-03Made some changes from review comments:TheKoopaKingdom1-1/+2
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review). - Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore. - Made dialog messages more clear. - Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic. - Cleaned up some other stuff.
2017-05-25FileSys: Move all result description to errors.hYuri Kunde Schlesner5-61/+96
2017-03-08file_sys: lower log level for setting host pathwwylele4-4/+4
2017-02-27Doxygen: Amend minor issues (#2593)Mat M1-1/+1
Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
2017-02-13loader: use self NCCH archivewwylele2-81/+0
2017-02-13file_sys: add Self NCCH archivewwylele3-0/+312
2017-01-29core: fix savedata_archive.cpp warnings about unhandled enumeration values on OSXKloen1-0/+12
2017-01-29core: fix archive_sdmc.cpp warnings about unhandled enumeration value on OSXKloen1-0/+12
2017-01-29core: fix archive_extsavedata.cpp warning on OSXKloen1-0/+2
2016-12-22Address clang-format issues.bunnei1-4/+3
2016-12-22core: Remove HLE module, consolidate code & various cleanups.bunnei4-5/+5
2016-12-15archive_source_sd_savedata: Add static method to get a specific save data pathMerryMage2-0/+7
2016-12-07file_sys: Make a few single-argument constructors explicitLioncash8-10/+10
Prevents implicit conversions.
2016-11-29FileSys: Implement OtherSaveDatawwylele3-0/+200
2016-11-29FileSys: abstract SD save data archive sourcewwylele4-78/+132
2016-11-19FileSys: rename SaveDataCheck archive to NCCH archivewwylele2-15/+15
According to the observation from game and 3dbrew "Used for accessing general NCCH data"
2016-11-19FileSys: remove unused DiskArchivewwylele2-179/+0
All "subclasses" of DiskArchive are splitted out. This class is useless
2016-11-19FileSys: w->rw permission lift only happens in SDMC archivewwylele4-2/+14
2016-11-19FileSys: add SDMCWriteOnlyArchivewwylele3-0/+129
2016-11-19FileSys: add SDMCArchivewwylele3-1/+301
Now DiskArchive only serves for SDMC, then it should be just a "SDMCArchive"
2016-11-19FileSys: add ExtSaveDataArchivewwylele1-1/+114
ExtSaveData is more similar to SaveData, so let it be a subclass of SaveData
2016-11-19FileSys: add SaveDataArchivewwylele5-4/+359
The error checking of SaveDataArchive is completely different from DiskArchive, so it has to be a new class instead of a subclass of DiskArchive.
2016-11-19FileSys: remove Open from FileBackendwwylele4-64/+44
Same as directory, file shouldn't expose Open either.
2016-11-19FileSys: remove Open from DirectoryBackendwwylele4-25/+5
Open should not be an interface exposed by Directory because it is the Archive thats implement the methed to open the directory. The service API of 3DS also implies this - Open is not a function of directory service, but is of FS main service
2016-11-19FileSys: add PathParserwwylele2-0/+159
2016-11-01FileSys: make Archive interfaces return error codewwylele5-55/+82
and make the mode parameter a reference since it is a BitField union
2016-10-02fs: implement DeleteDirectoryRecursivelywwylele5-0/+19
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner9-9/+9
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot20-44/+9
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner8-43/+30
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot20-136/+217
2016-05-21FileSys/Path: Replace Memory::GetPointer with Memory::ReadBlockMerryMage1-6/+6
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage8-19/+17
2016-03-21archive_extsavedata: Fix member initialization orderLioncash1-1/+2
shared appears in the initializer list before mount_point
2016-03-20HLE/FS: Change the error code returned when an ExtSaveData archive is not found.Subv4-29/+37
This allows Fire Emblem to boot again.
2016-03-20HLE/FS: Corrected some style concerns.Subv4-8/+8
2016-03-20HLE/FS: Implemented GetFormatInfoSubv13-14/+130
Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive.
2016-03-20HLE/FS: Return the proper error codes when opening files.Subv6-25/+39
2016-03-20HLE/FS: Return the proper error codes on file Read/Write operations.Subv5-16/+24
These operations are limited by the open flags specified while opening the file.
2016-03-20HLE/FS: Corrected the error codes for DeleteFileSubv5-8/+21
2016-03-20HLE/FS: Corrected the error codes for CreateFileSubv1-1/+4
2016-03-20HLE/FS: FS::CreateFile takes an u64 for the file size.Subv5-5/+5
2016-01-25archive_backend: Remove unnecessary const from return typesLioncash2-8/+8
This doesn't return by reference so const isn't really necessary
2016-01-16DiskDirectory: Initialize the directory member with valid info.Subv1-2/+4
2015-10-28Implement FS_User::GetFreeBytesarchshift5-0/+18
2015-09-30ivfc_archive: Fix a printf specifierLioncash1-1/+1
2015-09-10disk_archive: Remove unimplemented constructor declarationsLioncash1-2/+0
2015-08-29Services/FS: Correctly tell the guest app whether a file was correctly opened or not.Subv1-1/+1
Closes #1067
2015-07-14Archive: Correct a few incorrect types in function signaturesYuri Kunde Schlesner5-21/+21
Buffer lengths should be size_t, and file offsets should be u64.
2015-07-14Loader: Remove unnecessary pointer indirection to IOFileYuri Kunde Schlesner2-2/+2
2015-07-14FS: Stream RomFS from file instead of loading all of it to memorycondut5-23/+27
2015-07-12Core: Properly configure address space when loading a binaryYuri Kunde Schlesner1-2/+2
The code now properly configures the process image to match the loaded binary segments (code, rodata, data) instead of just blindly allocating a large chunk of dummy memory.
2015-06-28Core: Cleanup file_sys includes.Emmanuel Gil Peyrot17-30/+52
2015-06-28CitraQt: Cleanup includes.Emmanuel Gil Peyrot1-0/+1
2015-06-28Common: Cleanup memory and misc includes.Emmanuel Gil Peyrot1-0/+2
2015-06-28Common: Fix FileUtil includes, and everything relying on those.Emmanuel Gil Peyrot4-0/+4
2015-06-02ExtSavedata: Save the icon passed to CreateExtSaveData to the correct folder.Subv1-3/+6
Organize the ExtSaveData folders as they are stored in the console.
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot3-5/+5
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner1-1/+1
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-09Kernel: Remove g_program_idYuri Kunde Schlesner1-2/+3
This has been obsoleted by the field in Process.
2015-05-07Common: Remove common.hYuri Kunde Schlesner8-1/+7
2015-05-07Clean-up includesYuri Kunde Schlesner2-4/+2
2015-05-07FileSys: De-inline Path membersYuri Kunde Schlesner2-125/+136
2015-05-07FileSys: Clean-up includes, de-inline destructorsYuri Kunde Schlesner3-7/+14
2015-04-14Headers: Add some forgotten overrides, thanks clang!Emmanuel Gil Peyrot1-1/+1
2015-03-14Services/FS: Implemented DeleteExtSaveData, CreateSystemSaveData and DeleteSystemSaveDataSubv4-2/+76
Also fixed a bug with CreateExtSaveData that made it unable to create ExtSaveData archives in the SDMC directory.
2015-02-26Archives: Properly implemented the SystemSaveData archive.Subv2-19/+28
Ported to the new factory pattern we have for archives.
2015-02-10FS: Allow multiple instances of the same archive type to be open at onceYuri Kunde Schlesner15-129/+163
2015-01-24Services: Stubbed more services.Subv2-2/+19
Implemented FSUser::CreateExtSaveData
2015-01-06Archives/Exdata: Don't set concrete_mount_point in the ctorSubv1-1/+1
2015-01-06Archives: Addressed some commentsSubv4-13/+13
2015-01-05SaveDataCheck: Fixed a typoSubv1-1/+1
2015-01-04Archives: Make SYSTEM_ID and SDCARD_ID stringsSubv4-5/+7
2015-01-04Archives: Changed the way paths are built for the archives.Subv6-12/+44
Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
2015-01-04SaveDataCheck: Move the files to nand/titleSubv1-1/+2
under /nand/title/high/low/content/00000000.app.romfs
2015-01-03FileSys: Fix crash bug in DiskFile exposed by #400Yuri Kunde Schlesner1-4/+0
2015-01-03FileSys: Fix a few memory leaksYuri Kunde Schlesner2-6/+7
2015-01-03Archives: Change the folder layout of some archives.Subv1-2/+1
This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
2015-01-03IVFCArchive: Use a critical log to notify of invalid operations.Subv1-9/+9
2015-01-03SaveDataCheck: Remove unneeded constructor from a classSubv1-2/+0
2015-01-03Archives: Added some documentation to IVFCArchiveSubv1-0/+5
2015-01-03Archives: Reduced duplicate code in RomFS and SaveCheck.Subv11-333/+229
Fixed a few warnings and cleaned up the code
2015-01-03SaveDataCheck: Preliminary work in this archive.Subv2-4/+28
This allows Steel Diver to boot further, some files are needed. This is still not ready and needs a big cleanup, this will possibly be delayed until the way we handle archives is fixed (with factory classes instead of ahead-of-time creation of archives)
2014-12-30Archives: Implemented ExtSaveData and SharedExtSaveDataSubv8-15/+168
They will be stored in /extsavedata/SDMC and /extsavedata/NAND respectively. Also redirect some APT_A functions to their APT_U equivalents. Implemented the gamecoin.dat file in SharedExtSaveData in the PTM module. Implemented formatting the savegame. Retake a previous savegame if it exists instead of reporting them as not formatted every time a game is loaded.
2014-12-24FileSys: Clean up according to the coding style, and remove redundant namespaced names.Emmanuel Gil Peyrot9-169/+97
2014-12-21CFG: Create a new subfolder cfg inside service to handle cfgSubv1-0/+1
Moved most of the shared CFG code there, implemented a few CFG:I functions
2014-12-21Style: Addressed some commentsSubv1-2/+7
2014-12-21CFG: Refactored how the config file works.Subv1-1/+1
It is now kept in memory as per 3dbrew, all updates happen on memory, then they can be saved using UpdateConfigNANDSavegame.
2014-12-21CFG: Implemented the GetConfigInfoBlk2 function.Subv3-3/+9
Added a "config" file to the CFG process service (CFG:U), and added a few default blocks to it. Implemented GetSystemModel and GetModelNintendo2DS
2014-12-21Added CreateFile to the FS_USER servicearchshift5-0/+44
Tested with hwtests.
2014-12-21License changepurpasmart9617-17/+17
2014-12-20Clean up some warningsChin1-1/+10
2014-12-20Common: Add a clone of std::make_uniqueYuri Kunde Schlesner1-2/+3
2014-12-18SystemSaveData: Added a TODO to move it to the NAND.Subv1-1/+3
Maybe sometime when we actually implement that
2014-12-18SaveData: Implemented the SystemSaveData archive.Subv3-2/+65
It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
2014-12-18Filesystem/Archives: Implemented the SaveData archiveSubv12-473/+344
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information Got rid of the code duplication in File and Directory Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive. FS_U: Use the correct error code when a file wasn't found
2014-12-16FS.Archive: Clean up treatment of archives and their handlesYuri Kunde Schlesner7-190/+21
- Refactor FS::Archive internals to make Archive creation and lifetime management clearer. - Remove the "Archive as a File" hack. - Implement 64-bit Archive handles.
2014-12-16Service.FS: Rename FileSys::File to FileBackendYuri Kunde Schlesner8-15/+15
2014-12-16Service.FS: Rename FileSys::Directory to DirectoryBackendYuri Kunde Schlesner8-15/+15
2014-12-16Service.FS: Rename FileSys::Archive to ArchiveBackendYuri Kunde Schlesner3-6/+6
2014-12-16Service.FS: Do archive registration using IdCode instead of nameYuri Kunde Schlesner3-25/+4
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner5-24/+28
2014-12-08Kernel/File: Fixed file read/write hwtestsSubv1-3/+6
The 3DS allows the user to read from files opened with the Write access modifier, even if he did not specify the Read access modifier. Open the files in binary mode so that we can prevent CR/LF problems in Windows, where a line-end is replaced by these two bytes instead of just 0xA, this was causing problems with the GetSize test
2014-12-07Make OpenDirectory fail if the directory doesn't existarchshift6-3/+35
This is in line with what the hardware itself does. It does this by splitting the initial directory opening into Directory.Open(), which will return false if a stat fails. Then, Archive::OpenDirectory will return nullptr, and archive.cpp will return an error code .
2014-12-04Updated archive.cpp functions for proper error handlingarchshift2-24/+0
2014-11-27Fixed formatting and switch statement warningsvaguilar2-1/+3
2014-11-25Implemented RenameDirectory in FS:USERarchshift5-0/+45
2014-11-25Implemented RenameFile in FS:USERarchshift5-0/+45
2014-11-23Added DeleteFile and DeleteDirectory functions to FS:USER and the archives.archshift5-0/+80
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2-2/+2
2014-11-18directory_sdmc: Fix a signed/unsigned mismatch comparisonLioncash1-1/+1
2014-11-18Remove extraneous semicolonsLioncash3-3/+3
2014-11-18FileSys: Updated backend code to use FileSys::Path instead of string for paths.bunnei9-24/+24
2014-11-18FileSys: Added DebugStr method to Path class.bunnei1-0/+29
2014-11-13Use std::u16string for conversion between UTF-8 and UTF-16, FS:USER functionsarchshift1-0/+99
2014-11-02Added CreateDirectory function to service/fs.cpp, and in Archive.archshift5-0/+40
2014-10-30Fix some warningsSean2-2/+2
2014-10-23Use config files to store whether SDMC is enabled or notarchshift1-2/+8
Before, it used to use whether the directory actually existed. As a result, .citra-emu/sdmc was never auto-created (something quite confusing to me until I read through the logs).
2014-10-06Common: Add a helper function to generate a 8.3 filename from a long one.Emmanuel Gil Peyrot3-29/+27
Core: Fix the SDMC Directory implementation to make blargSnes work.
2014-10-06FileSys: Add static asserts for the Directory struct, and fix its fields position.Emmanuel Gil Peyrot1-2/+8
2014-10-06FileSys: split the constructor into an Open method, in order to notify the opener something went wrong.Emmanuel Gil Peyrot6-14/+54
Kernel: Return an invalid handle to OpenFile when it failed to open.
2014-10-06FileSys/Kernel: Implement SetSize service call for File objects.Emmanuel Gil Peyrot5-0/+41
2014-10-06FileSys: Add forgotten docstrings.Emmanuel Gil Peyrot7-4/+35
2014-09-28Fix warnings in core and commonLioncash1-1/+1
2014-09-17Core: Add a method to obtain a Directory from an Archive.Emmanuel Gil Peyrot5-0/+44
2014-09-17Core: Add a Directory object, with both a stub and a passthrough implementations.Emmanuel Gil Peyrot5-0/+259
2014-09-17Core: Add a passthrough backend for the filesystem, exposed as SDMC.Emmanuel Gil Peyrot4-0/+298
2014-09-17Core: Add a new File class, obtainable from an Archive, and a stub implementation.Emmanuel Gil Peyrot6-0/+205
2014-08-23Added FS functions to Archive and Archive_RomFSarchshift3-8/+57
2014-07-05Marked AppLoader_ELF, AppLoader_NCCH, and Archive_RomFS virtual functions as "override".bunnei1-4/+4
2014-07-05Marked AppLoader_ELF, AppLoader_NCCH, and Archive_RomFS classes as "final"bunnei1-1/+1
2014-07-05Loader: Updated read methods to be constbunnei2-2/+2
- Required "file" handle to be made local and explicitly opened/closed as needed
2014-07-05FileSys: Added preliminary support for applications reading the RomFS archive.bunnei4-138/+150
Archive: Fixed brace ugliness for neobrain :) FS: Commented out unused local variables to prevent warnings. ...But keeping them here for future use. archive_romfs: Removed unused #include.
2014-06-27Core: Removed unused directory_file_system and meta_file_system modules.bunnei4-1453/+0
Core: Updated CMakeLists.txt to remove directory_file_system and meta_file_system modules.
2014-04-23fixes to build on linuxbunnei2-22/+22
2014-04-09fixed project includes to use new directory structurebunnei5-20/+15
2014-04-09got rid of 'src' folders in each sub-projectbunnei5-0/+1596