summaryrefslogtreecommitdiff
path: root/src/common/file_util.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* file_util: Add getter for NAND registration directoryGravatar Zach Hilman2018-08-111-0/+2
|
* file_util: Use enum instead of bool for specifing path behaviorGravatar Zach Hilman2018-08-081-2/+5
|
* file_util: Add platform-specific slash option to SanitizePathGravatar Zach Hilman2018-08-081-2/+3
|
* Merge pull request #966 from lioncash/modernizeGravatar bunnei2018-08-081-5/+5
|\ | | | | common: Convert type traits templates over to variable template versions where applicable
| * common: Convert type traits templates over to variable template versions ↵Gravatar Lioncash2018-08-071-5/+5
| | | | | | | | | | | | where applicable Uses the C++17 inline variable variants
* | file_util: Avoid sign-conversions in WriteArray() and ReadArray()Gravatar Lioncash2018-08-071-4/+8
|/ | | | Prevents compiler warnings.
* Allow key loading from %YUZU_DIR%/keys in addition to ~/.switchGravatar Zach Hilman2018-08-011-0/+1
|
* Remove files that are not usedGravatar Zach Hilman2018-08-011-0/+2
|
* VFS Regression and Accuracy Fixes (#776)Gravatar Zach Hilman2018-07-231-0/+3
| | | | | | | | | | | | | | | | * 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&
* file_util, vfs: Use std::string_view where applicableGravatar Lioncash2018-07-221-6/+7
| | | | | Avoids unnecessary construction of std::string instances where applicable.
* file_util: Use a u64 to represent number of entriesGravatar Lioncash2018-07-211-4/+4
| | | | | 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.
* file_util: Use an enum class for GetUserPath()Gravatar Lioncash2018-07-211-14/+13
| | | | | | | | | | | | | 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.
* file_util: return string by const reference for GetExeDirectory()Gravatar Lioncash2018-07-191-1/+1
| | | | | This disallows modifying the internal string buffer (which shouldn't be modified anyhow).
* Virtual Filesystem 2: Electric Boogaloo (#676)Gravatar Zach Hilman2018-07-181-31/+35
| | | | | | | | | | * Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
* Revert "Virtual Filesystem (#597)"Gravatar bunnei2018-07-071-32/+31
| | | | This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
* Virtual Filesystem (#597)Gravatar Zach Hilman2018-07-061-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add configurable logging backendsGravatar James Rowe2018-07-021-2/+9
|
* file_util: Make move constructor/assignment operator and related functions ↵Gravatar Lioncash2018-04-291-3/+3
| | | | | | | | | noexcept Without this, it's possible to get compilation failures in the (rare) scenario where a container is used to store a bunch of live IOFile instances, as they may be using std::move_if_noexcept under the hood. Given these definitely don't throw exceptions this is also not incorrect to add either.
* file_util: Add static assertions to ReadBytes() and WriteBytes()Gravatar Lioncash2018-04-291-2/+6
| | | | | | Ensure that the actual types being passed in are trivially copyable. The internal call to ReadArray() and WriteArray() will always succeed, since they're passed a pointer to char* which is always trivially copyable.
* file_util: Remove compiler version checks around is_trivially_copyable()Gravatar Lioncash2018-04-281-8/+0
| | | | | | The minimum clang/GCC versions we support already support this. We can also remove is_standard_layout(), as fread and fwrite only require the type to be trivially copyable.
* file_util.h: Update Comment from citra to yuzuGravatar N00byKing2018-03-261-1/+1
|
* Format: Run the new clang format on everythingGravatar James Rowe2018-01-201-1/+1
|
* file_util: Remove unused paths.Gravatar bunnei2016-12-211-20/+0
|
* Switch to AppData/RoamingGravatar freiro2016-11-241-1/+1
|
* Return by value and other fixesGravatar freiro2016-11-191-1/+1
|
* Win32 move default user folder location to AppDataGravatar freiro2016-11-191-0/+1
|
* Remove empty newlines in #include blocks.Gravatar Emmanuel Gil Peyrot2016-09-211-2/+0
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Gravatar Emmanuel Gil Peyrot2016-09-181-55/+63
|
* Fix recursive scanning of directoriesGravatar Yuri Kunde Schlesner2016-06-191-5/+2
| | | | | | ForeachDirectoryEntry didn't actually do anything with the `recursive` parameter, and the corresponding callback parameter was shadowing the actual recursion counters in the user functions.
* Common: Make recursive FileUtil functions take a maximum recursionGravatar Emmanuel Gil Peyrot2016-05-211-4/+8
| | | | | | | | | | Fixes #1115. Also improves the performances of DiskArchive’s directory implementation a lot, simply by not going through the entire tree instead of just listing the first level files. Thanks to JayRoxFox for rebasing this on current master!
* VideoCore: Run include-what-you-use and fix most includes.Gravatar Emmanuel Gil Peyrot2016-04-301-1/+1
|
* Protect use of std::is_trivially_copyable to compile with GCC 4.9Gravatar LittleWhite2016-04-231-0/+4
|
* file_util: In-class initialize data membersGravatar Lioncash2016-04-131-2/+2
|
* file_util: const qualify IOFile's Tell and GetSize functionsGravatar Lioncash2016-04-131-2/+2
|
* file_util: Don't expose IOFile internals through the APIGravatar Lioncash2016-04-131-8/+1
|
* file_util: Check for is_trivially_copyableGravatar Lioncash2016-04-131-3/+5
| | | | Also applies the template checks to ReadArray as well.
* file_util: Make IOFile data members privateGravatar Lioncash2016-04-131-0/+1
|
* FileUtil: Missing #include, Add const to IOFile methodsGravatar MerryMage2016-04-121-6/+7
|
* Refactor ScanDirectoryTreeAndCallback to separate errors and retvalsGravatar archshift2015-11-271-13/+18
| | | | | | | | | ScanDirectoryTreeAndCallback, before this change, coupled error/return codes and actual return values (number of entries found). This caused confusion and difficulty interpreting the precise way the function worked. Supersedes, and closes #1255.
* Split up FileUtil::ScanDirectoryTree to be able to use callbacks for custom ↵Gravatar archshift2015-09-301-3/+23
| | | | | | | behavior Converted FileUtil::ScanDirectoryTree and FileUtil::DeleteDirRecursively to use the new ScanDirectoryTreeAndCallback function internally.
* Fix building under MinGWGravatar darkf2015-08-171-1/+1
|
* Common: Remove the unused and commented GetThemeDir prototype from FileUtil.Gravatar Emmanuel Gil Peyrot2015-07-181-3/+0
|
* FileUtil: Add a WriteObject method for writing a single, POD-type object.Gravatar Tony Wasserka2015-07-131-0/+10
|
* Common: Fix FileUtil includes, and everything relying on those.Gravatar Emmanuel Gil Peyrot2015-06-281-2/+1
|
* Common: Remove common.hGravatar Yuri Kunde Schlesner2015-05-071-1/+1
|
* Archives: Changed the way paths are built for the archives.Gravatar Subv2015-01-031-5/+1
| | | | 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
* Archives: Change the folder layout of some archives.Gravatar Subv2015-01-021-0/+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
* Archives: Reduced duplicate code in RomFS and SaveCheck.Gravatar Subv2015-01-021-0/+1
| | | | Fixed a few warnings and cleaned up the code
* Archives: Implemented ExtSaveData and SharedExtSaveDataGravatar Subv2014-12-291-0/+1
| | | | | | | | 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.
* License changeGravatar purpasmart962014-12-201-2/+2
|