summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-07-24VFS Regression and Accuracy Fixes (#776)Zach Hilman1-16/+29
* 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-22file_util, vfs: Use std::string_view where applicableLioncash1-1/+1
Avoids unnecessary construction of std::string instances where applicable.
2018-07-21file_util: Use an enum class for GetUserPath()Lioncash1-2/+2
Instead of using an unsigned int as a parameter and expecting a user to always pass in the correct values, we can just convert the enum into an enum class and use that type as the parameter type instead, which makes the interface more type safe. We also get rid of the bookkeeping "NUM_" element in the enum by just using an unordered map. This function is generally low-frequency in terms of calls (and I'd hope so, considering otherwise would mean we're slamming the disk with IO all the time) so I'd consider this acceptable in this case.
2018-07-19Filesystem: Return EntryType::Directory for the root directory.Subv1-0/+4
It is unknown if this is correct behavior, but it makes sense and fixes a regression with Stardew Valley.
2018-07-19fsp_srv: Remove unnecessary vector construction in IFile's Write() functionLioncash1-2/+3
We can avoid constructing a std::vector here by simply passing a pointer to the original data and the size of the copy we wish to perform to the backend's Write() function instead, avoiding copying the data where it's otherwise not needed.
2018-07-19fsp_srv: Remove unnecessary std::vector construction in IDirectory's Read() functionLioncash1-10/+8
We were using a second std::vector as a buffer to convert another std::vector's data into a byte sequence, however we can just use pointers to the original data and use them directly with WriteBuffer, which avoids copying the data at all into a separate std::vector. We simply cast the pointers to u8* (which is allowed by the standard, given std::uint8_t is an alias for unsigned char on platforms that we support).
2018-07-19filesystem: std::move VirtualDir instance in VfsDirectoryServiceWrapper's constructorLioncash1-1/+3
Avoids unnecessary atomic reference count incrementing and decrementing
2018-07-19filesystem: Use std::string's empty() function instead of comparing against a literalLioncash1-1/+1
This is simply a basic value check as opposed to potentially doing string based operations (unlikely, but still, avoiding it is free).
2018-07-19filesystem: Remove pragma disabling global optimizationsLioncash1-2/+0
This was just an artifact missed during PR review.
2018-07-19fsp_srv: Make IStorage constructor explicitLioncash1-1/+1
Prevents implicit conversions.
2018-07-19fsp_srv: Add missing includesLioncash1-0/+5
Gets rid of relying on indirect inclusions.
2018-07-19fsp_srv: Resolve sign-mismatch warnings in assertion comparisonsLioncash1-3/+3
2018-07-19fsp_srv: Respect write length in Write()Lioncash1-4/+5
Previously we were just copying the data whole-sale, even if the length was less than the total data size. This effectively makes the actual_data vector useless, which is likely not intended. Instead, amend this to only copy the given length amount of data. At the same time, we can avoid zeroing out the data before using it by passing iterators to the constructor instead of a size.
2018-07-19Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman4-115/+383
* Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
2018-07-18hle/filesystem: Amend trace log in OpenSaveData() to compile in debug modeLioncash1-1/+1
Previously this wouldn't compile, since no such function named SaveStructDebugInfo() exists.
2018-07-17General Filesystem and Save Data Fixes (#670)Zach Hilman4-87/+125
2018-07-08Revert "Virtual Filesystem (#597)"bunnei4-404/+70
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
2018-07-06Virtual Filesystem (#597)Zach Hilman4-70/+404
* 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 Rowe1-2/+2
2018-07-03Rename logging macro back to LOG_*James Rowe2-28/+28
2018-06-19Services/FS: Return the correct error code when trying to mount a nonexistent savedata.Subv1-2/+11
2018-06-07Common/string_util: add StringFromBuffer functionmailwl1-22/+9
convert input buffer (std::vector<u8>) to string, stripping zero chars
2018-05-02general: Make formatting of logged hex values more straightforwardLioncash2-6/+6
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-24filesystem: Move logging macros over to new fmt-compatible onesLioncash2-30/+29
2018-04-24Service/FS: implement IFileSystem::RenameFilemailwl1-1/+21
2018-04-20service: Use nested namespace specifiers where applicableLioncash3-12/+6
Tidies up namespace declarations
2018-04-15fsp_srv: Implement DeleteFile.bunnei1-1/+15
- Used by Binding of Isaac.
2018-04-15fsp_srv: Implement IFile::Flush.bunnei1-1/+9
2018-04-11Various fixes and clangHexagon121-12/+5
2018-04-10Updated fsp-srv with more service names.Hexagon121-4/+102
2018-04-07Fix spelling of InitializeJames Rowe2-3/+3
2018-04-01hle_ipc, fsp_srv: Cleanup logging.bunnei1-2/+2
2018-03-31fsp_srv: Implement GetSize and SetSize.bunnei1-2/+21
2018-03-21FS: Implemented IFileSystem::CreateDirectory.Subv1-0/+15
2018-03-20FS: Implemented IFileSystem's OpenDirectory function.Subv1-0/+28
Note that the filter parameter is not yet implemented.
2018-03-20FS: Added the IDirectory IPC interface and implemented its two functions.Subv1-0/+51
2018-03-20FS: Implement MountSdCard.Subv1-2/+6
2018-03-20FS: Added an SDMC archive factory and registered it to the SDMC archive on startup.Subv2-0/+6
2018-03-19oopsN00byKing1-3/+3
2018-03-19Clean Warnings (?)N00byKing1-3/+3
2018-03-04FS: Stubbed CreateSaveData. It currently does nothing.Subv2-0/+15
2018-03-04FS: Make EnsureSaveData create the savedata folder when called for the first time.Subv2-0/+20
2018-03-02FS: Implement MountSaveData and some of the IFile interface.Subv2-0/+189
2018-03-02Filesystem: Added a SaveData Factory and associated Disk_FileSystem.Subv2-2/+10
2018-02-14service: Remove remaining uses of BufferDescriptor*.bunnei1-3/+1
2018-02-10fsp_srv: Stub MountSdCard.bunnei2-0/+9
2018-02-07Service: stub some functions in am, audio, time, vi servicesmailwl1-0/+1
2018-01-25hle: Rename RequestBuilder to ResponseBuilder.bunnei1-9/+9
2018-01-25service: Fix all incorrect IPC response headers.bunnei1-2/+2
2018-01-21fsp_srv: Various improvements to IStorage:Read implementation.bunnei3-48/+72
2018-01-21filesystem: Implement basic IStorage functionality.David Marcec4-0/+252