summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/vfs_real.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-07-06vfs_real: use open file size for getting size (#11016)liamwhite1-1/+2
2023-06-23vfs_real: lock concurrent accessesLiam1-19/+36
2023-06-16vfs_real: ensure size cache is reset on writeLiam1-0/+2
2023-06-16vfs_real: misc optimizationsLiam1-18/+26
2023-06-13vfs_real: require file existence on openLiam1-0/+4
2023-06-13vfs_real: add simplified open file cacheLiam1-1/+16
2023-06-13vfs_real: lazily open filesLiam1-9/+2
2023-06-13vfs_real: add file LRU cache for open file limitsLiam1-94/+83
2022-06-14common: Change semantics of UNREACHABLE to unconditionally crashLiam1-1/+1
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2021-09-14vfs: Partially implement GetFileTimeStampRawMorph1-0/+29
Gets rid of homebrew warnings using this func
2021-06-22vfs_real: Fix Mode to FileAccessMode conversionMorph1-6/+1
These enforce requiring the file to exist prior to opening.
2021-05-26common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph1-123/+122
* common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-05-02file_sys: Resolve cases of variable shadowingLioncash1-8/+8
Brings us closer to enabling -Wshadow as an error in the core code.
2021-01-23vfs_real: When moving files or directories, don't assume file opening will succeedcomex1-4/+10
Found this via a warning, but it's a substantive fix. Since this is only for a cache, it should be safe to silently drop the entry if opening fails. I think.
2020-12-12Revert "Merge pull request #5176 from Morph1984/fix-createfile"Morph1-6/+2
This reverts commit 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76, reversing changes made to 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a.
2020-12-10vfs: Use existing type aliases consistentlyLioncash1-12/+12
Makes use of the VirtualDir and VirtualFile aliases across the board instead of having a few isolated places that don't use it.
2020-12-09vfs_real: Fix CreateFile for files without a file extensionMorph1-2/+6
2020-08-18vfs_real: Resolve sign conversion warningsLioncash1-2/+2
2020-08-18vfs_real: Avoid redundant map lookupsLioncash1-30/+46
Avoids some trivially avoidable map lookups by keeping the result of find operations around and querying them.
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash1-83/+94
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-08-03file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with ModeLioncash1-13/+17
Same behavior, minus a hand-rolled operator.
2020-07-10vfs_real: Fix MoveFileMorph1-10/+17
The file wasn't closed prior to being renamed / moved, throwing an error that states "The process cannot access the file because it is being used by another process." Fix this by closing the file prior to a rename / move operation. Fixes saving in Luigi's Mansion 3 and KATANA KAMI: A Way of the Samurai Story.
2018-10-19vfs: Remove InterpretAsDirectory and related functionsZach Hilman1-3/+0
When writing VFS, it initally seemed useful to include a function to in-place convert container files into directories in one homogenous directory structure, but re-evaluating it now there have been plenty of chances to use it and there has always been a better way. Removing as it is unused and likely will not be used.
2018-09-24fsmitm: Cleanup and modernize fsmitm portZach Hilman1-2/+2
2018-09-22vfs: Add GetEntries methodZach Hilman1-0/+17
Maps name string to directory or file.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-4/+4
2018-09-02vfs_real: Forward declare IOFileLioncash1-0/+6
Eliminates the need to rebuild some source files if the file_util header ever changes. This also uncovered some indirect inclusions, which have also been fixed.
2018-08-27vfs_real: Remove unused variable in CreateDirectoryRelative()Lioncash1-1/+0
2018-08-12registration: Various style and documentation improvementsZach Hilman1-6/+10
Fix logic in RealVfsFilesystem Create methods Remove magic numbers Fix regex errors
2018-08-12vfs_real: Add CreateFullPath to Create* operationsZach Hilman1-12/+6
2018-08-12registration: Update documentation and styleZach Hilman1-5/+12
2018-08-12vfs_real: Add CreateFullPath to CreateFileZach Hilman1-3/+6
Fixes bugs with calling CreateFile when the immediate directory does not exist.
2018-08-09file_util: Use enum instead of bool for specifing path behaviorZach Hilman1-17/+27
2018-08-09vfs: Add unreachable assert to file permissions converterZach Hilman1-1/+3
2018-08-09vfs: Add RealVfsFilesystem implementationZach Hilman1-75/+252
2018-07-28RomFS ExtractionZach Hilman1-0/+6
2018-07-24VFS Regression and Accuracy Fixes (#776)Zach Hilman1-20/+27
* 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-18/+39
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-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 includesLioncash1-0/+1
2018-07-21partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicableLioncash1-1/+2
Avoids unnecessary atomic increment and decrement operations.
2018-07-21partition_filesystem, vfs_real: Use std::distance() instead of subtractionLioncash1-2/+5
This is a little bit more self-documenting on what is being done here.
2018-07-19Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman1-0/+177
* Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
2018-07-08Revert "Virtual Filesystem (#597)"bunnei1-168/+0
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
2018-07-06Virtual Filesystem (#597)Zach Hilman1-0/+168
* 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