Commit Graph

81 Commits (29aff8d5ab46c8d0199aa4bfa7eeff5d4fa2d7ef)

Author SHA1 Message Date
Zach Hilman 29aff8d5ab Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
8 years ago
bunnei 913896cbd9 Revert "Virtual Filesystem (#597)"
This reverts commit 77c684c114.
8 years ago
bunnei bebe09a1aa
Merge pull request #630 from FearlessTobi/remove-citra-references
Remove some references to Citra
8 years ago
Zach Hilman 77c684c114 Virtual Filesystem (#597)
* 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
8 years ago
fearlessTobi c9aadff9a9 Remove some references to Citra 8 years ago
James Rowe 6269a01b4e Add configurable logging backends 8 years ago
James Rowe 0d46f0df12 Update clang format 8 years ago
James Rowe 638956aa81 Rename logging macro back to LOG_* 8 years ago
Lioncash e8bbafb746
file_util: Make move constructor/assignment operator and related functions 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.
8 years ago
Lioncash 8475496630
general: Convert assertion macros over to be fmt-compatible 8 years ago
Lioncash 3cfe77ae75
common: Move logging macros over to new fmt-capable macros where applicable 8 years ago
James Rowe 096be16636 Format: Run the new clang format on everything 8 years ago
wwylele d040a73bed file_util: Log when using local user directory 9 years ago
wwylele 7cd6cc0fd9 file_util: lower logging level for harmless cases 9 years ago
noah the goodra a2d0e2d807 file_util: Fixed implicit type conversion warning (#2503) 9 years ago
wwylele 488b7a4041 file_util: fix missing sysdata path 9 years ago
bunnei 707cc66362 file_util: Remove unused paths. 9 years ago
Jeffrey Pfau fb952c399e Common: Fix gcc build on macOS 9 years ago
freiro 0c22e52f52 WINVER definition moved to CMake and cleanup 10 years ago
freiro 972b289c78 Removed /user/ from path 10 years ago
freiro 79317b63d9 Switch to AppData/Roaming 10 years ago
freiro 3d75e3cd07 Return by value and other fixes 10 years ago
freiro 29bb82cb8e Win32 move default user folder location to AppData 10 years ago
Anthony J. Bentley 26af2b644c common: convert to standard stat()/fstat() interfaces
Most modern Unix environments use 64-bit off_t by default: OpenBSD,
FreeBSD, OS X, and Linux libc implementations such as Musl.

glibc is the lone exception; it can default to 32 bits but this is
configurable by setting _FILE_OFFSET_BITS.

Avoiding the stat64()/fstat64() interfaces is desirable because they
are nonstandard and not implemented on many systems (including
OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either
the default or trivial to set up.
10 years ago
Jan Beich 51f92f0e4e common: stat64 is non-standard, hide on a random Unix
src/common/file_util.cpp:79:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_info;
                  ^
src/common/file_util.cpp:79:12: note: forward declaration of 'stat64'
    struct stat64 file_info;
           ^
src/common/file_util.cpp:99:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_info;
                  ^
src/common/file_util.cpp:99:12: note: forward declaration of 'stat64'
    struct stat64 file_info;
           ^
src/common/file_util.cpp:342:19: error: variable has incomplete type 'struct stat64'
    struct stat64 buf;
                  ^
src/common/file_util.cpp:342:12: note: forward declaration of 'stat64'
    struct stat64 buf;
           ^
src/common/file_util.cpp:359:19: error: variable has incomplete type 'struct stat64'
    struct stat64 buf;
                  ^
src/common/file_util.cpp:359:12: note: forward declaration of 'stat64'
    struct stat64 buf;
           ^
4 errors generated.
10 years ago
Yuri Kunde Schlesner f120e78b56 Remove special rules for Windows.h and library includes 10 years ago
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 10 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
10 years ago
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 10 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 10 years ago
Emmanuel Gil Peyrot 519e7013be Common: readdir_r() is deprecated, switch to readdir(). 10 years ago
Yuri Kunde Schlesner d6792632f0 Fix recursive scanning of directories
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.
10 years ago
Emmanuel Gil Peyrot 8ab6f26c09 Common: Make recursive FileUtil functions take a maximum recursion
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!
10 years ago
bunnei 6d29c20208 Merge pull request #1672 from wwylele/win-driver-fix
Fix driver root identification on Windows
10 years ago
wwylele 43b6cbd762 fix driver root identification on Windows 10 years ago
Lioncash 5f51622e9d file_util: In-class initialize data members 10 years ago
Lioncash 655623ebb2 file_util: const qualify IOFile's Tell and GetSize functions 10 years ago
Lioncash a4120ca66c file_util: Don't expose IOFile internals through the API 10 years ago
LFsWang 87afef73b1 remove debug code 10 years ago
LFsWang be01912539 fix unicode url problem on windows 10 years ago
LFsWang acfa76aa38 Fix encode problem On Windows 10 years ago
Subv 922b31ebbd DiskDirectory: Initialize the directory member with valid info. 10 years ago
LFsWang 8376821776 Add missing return values in ForeachDirectoryEntry
ForeachDirectoryEntry is changed by #1256 ,but return value at last line
was missing.
10 years ago
archshift b3cfcf55ea Refactor ScanDirectoryTreeAndCallback to separate errors and retvals
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.
11 years ago
bunnei 11a64acf23 Merge pull request #1095 from archshift/game-list
Initial implementation of a game list
11 years ago
archshift 7134a17fc6 Split up FileUtil::ScanDirectoryTree to be able to use callbacks for custom behavior
Converted FileUtil::ScanDirectoryTree and FileUtil::DeleteDirRecursively
to use the new ScanDirectoryTreeAndCallback function internally.
11 years ago
Lioncash 751fbfdcc3 general: Silence some warnings when using clang 11 years ago
Emmanuel Gil Peyrot 8cf9eb7f43 Common: Fix FileUtil includes, and everything relying on those. 11 years ago
Emmanuel Gil Peyrot b1503b2020 Remove every trailing whitespace from the project (but externals). 11 years ago
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 11 years ago