aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
AgeCommit message (Collapse)Author
2018-08-12vfs: Make VfsFilesystem constructor explicitLioncash
Makes it consistent with the other VFS interfaces and prevents implicit construction.
2018-08-12vfs: Make type hierarchy objects classes instead of structsLioncash
struct should be used when the data type is very simple or otherwise has no invariants associated with it. Given these are used to form a hierarchy, class should be used instead.
2018-08-12made ResultStatus a u16David Marcec
2018-08-09loader: Add more descriptive errorsZach Hilman
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09Merge pull request #990 from lioncash/entrybunnei
fsp_srv: Emplace entries first when building index instead of emplacing last
2018-08-08vfs: Fix documentationZach Hilman
2018-08-08vfs: Fix typo in VfsFilesystem docsZach Hilman
2018-08-08file_util: Use enum instead of bool for specifing path behaviorZach Hilman
2018-08-08vfs: Use RealVfsFilesystem for fs-operations in RealVfsDirectoryZach Hilman
2018-08-08file_sys: Add missing include in savedata_factoryZach Hilman
2018-08-08vfs: Add unreachable assert to file permissions converterZach Hilman
2018-08-08vfs: Add RealVfsFilesystem implementationZach Hilman
2018-08-08vfs: Add VfsFilesystem interface and default implementationZach Hilman
2018-08-08fsp_srv: Use std::string_view's copy() function instead of strncpy()Lioncash
Given elements inserted into a vector are zeroed out, we can just copy MAX_LEN - 1 elements and the data will already be properly null terminated.
2018-08-08Merge pull request #850 from DarkLordZach/icon-metabunnei
Add Icons and Metadata Support
2018-08-06loader: Add icon and title support to XCIZach Hilman
2018-08-06Use const where applicableZach Hilman
2018-08-06Avoid parsing RomFS to directory in NCAZach Hilman
2018-08-04content_archive: Add support for titlekey cryptographyZach Hilman
2018-08-04Merge pull request #849 from DarkLordZach/xcibunnei
XCI and Encrypted NCA Support
2018-08-02vfs_vector: Remove unused variable in FindAndRemoveVectorElement()Lioncash
This wasn't being used for anything, so it can be removed.
2018-08-02vfs_vector: Avoid unnecessary copies where applicableLioncash
The lambda elements should be taken by const reference here, and we can move the virtual directory passed to ReplaceFileWithSubdirectory()
2018-08-01Add missing parameter to files.push_back()Zach Hilman
2018-08-01Use more descriptive error codes and messagesZach Hilman
2018-08-01Use ErrorEncrypted where applicable and fix no keys crashZach Hilman
2018-08-01Add missing includes and use const where applicableZach Hilman
2018-08-01Make XCI comply to review and style guidelinesZach Hilman
2018-08-01Extract mbedtls to cpp fileZach Hilman
2018-08-01Remove files that are not usedZach Hilman
2018-07-29partition_filesystem: Remove dynamic_cast in PrintDebugInfo()Lioncash
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-27RomFS ExtractionZach Hilman
2018-07-23Merge pull request #785 from lioncash/fsbunnei
partition_filesystem: Use std::move where applicable
2018-07-23VFS Regression and Accuracy Fixes (#776)Zach Hilman
* 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-23partition_filesystem: Use std::move where applicableLioncash
Avoids copying a std::string instance and avoids unnecessary atomic reference count incrementing and decrementing.
2018-07-23NRO Assets and NACP file formatZach Hilman
Cleanup Review fixes
2018-07-22vfs: Correct file_p variable usage within InterpretAsDirectory()Lioncash
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 applicableLioncash
Avoids unnecessary construction of std::string instances where applicable.
2018-07-21file_util: Use a u64 to represent number of entriesLioncash
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-21Merge pull request #754 from lioncash/partbunnei
partition_filesystem, vfs_real: Minor changes
2018-07-21Merge pull request #755 from lioncash/ctorbunnei
file_sys/errors: Remove redundant object constructor calls
2018-07-20file_sys/errors: Remove redundant object constructor callsLioncash
Given we're already constructing the error code, we don't need to call the constructor inside of it.
2018-07-20vfs_real: Remove redundant copying of std::vector instances in GetFiles() ↵Lioncash
and GetSubdirectories() We already return by value, so we don't explicitly need to make the copy.
2018-07-20partition_filesystem, vfs_real: Add missing standard includesLioncash
2018-07-20partition_filesystem, vfs_real: Use std::move in ↵Lioncash
ReplaceFileWithSubdirectory() where applicable Avoids unnecessary atomic increment and decrement operations.
2018-07-20partition_filesystem, vfs_real: Use std::distance() instead of subtractionLioncash
This is a little bit more self-documenting on what is being done here.
2018-07-20vfs_offset: Simplify TrimToFit()Lioncash
We can simply use std::clamp() here, instead of using an equivalent with std::max() and std::min().
2018-07-20vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by ↵Lioncash
const reference 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-20vfs: Use variable template variants of std::is_trivially_copyableLioncash
Provides the same behavior, but with less writing
2018-07-20vfs: Amend constness on pointers in WriteBytes() and WriteArrays() member ↵Lioncash
functions to be const qualified These functions don't modify the data being pointed to, so these can be pointers to const data
2018-07-20Merge pull request #737 from lioncash/movebunnei
filesys/loader: std::move VirtualFile instances in constructors where applicable