summaryrefslogtreecommitdiff
path: root/src/common/file_util.cpp
AgeCommit message (Collapse)Author
2018-04-29file_util: Make move constructor/assignment operator and related functions ↵Lioncash
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.
2018-04-27general: Convert assertion macros over to be fmt-compatibleLioncash
2018-04-26common: Move logging macros over to new fmt-capable macros where applicableLioncash
2018-01-20Format: Run the new clang format on everythingJames Rowe
2017-03-11file_util: Log when using local user directorywwylele
2017-03-08file_util: lower logging level for harmless caseswwylele
2017-01-30file_util: Fixed implicit type conversion warning (#2503)noah the goodra
2016-12-23file_util: fix missing sysdata pathwwylele
2016-12-21file_util: Remove unused paths.bunnei
2016-12-13Common: Fix gcc build on macOSJeffrey Pfau
2016-11-30WINVER definition moved to CMake and cleanupfreiro
2016-11-26Removed /user/ from pathfreiro
2016-11-24Switch to AppData/Roamingfreiro
2016-11-19Return by value and other fixesfreiro
2016-11-19Win32 move default user folder location to AppDatafreiro
2016-10-27common: convert to standard stat()/fstat() interfacesAnthony J. Bentley
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.
2016-10-27common: stat64 is non-standard, hide on a random UnixJan Beich
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.
2016-09-21Remove special rules for Windows.h and library includesYuri Kunde Schlesner
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot
2016-09-13Common: readdir_r() is deprecated, switch to readdir().Emmanuel Gil Peyrot
2016-06-19Fix recursive scanning of directoriesYuri Kunde Schlesner
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.
2016-05-21Common: Make recursive FileUtil functions take a maximum recursionEmmanuel Gil Peyrot
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!
2016-04-19Merge pull request #1672 from wwylele/win-driver-fixbunnei
Fix driver root identification on Windows
2016-04-15fix driver root identification on Windowswwylele
2016-04-13file_util: In-class initialize data membersLioncash
2016-04-13file_util: const qualify IOFile's Tell and GetSize functionsLioncash
2016-04-13file_util: Don't expose IOFile internals through the APILioncash
2016-03-31remove debug codeLFsWang
2016-03-31fix unicode url problem on windowsLFsWang
2016-03-31Fix encode problem On WindowsLFsWang
2016-01-16DiskDirectory: Initialize the directory member with valid info.Subv
2015-12-23Add missing return values in ForeachDirectoryEntryLFsWang
ForeachDirectoryEntry is changed by #1256 ,but return value at last line was missing.
2015-11-27Refactor ScanDirectoryTreeAndCallback to separate errors and retvalsarchshift
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.
2015-10-01Merge pull request #1095 from archshift/game-listbunnei
Initial implementation of a game list
2015-09-30Split up FileUtil::ScanDirectoryTree to be able to use callbacks for custom ↵archshift
behavior Converted FileUtil::ScanDirectoryTree and FileUtil::DeleteDirRecursively to use the new ScanDirectoryTreeAndCallback function internally.
2015-09-16general: Silence some warnings when using clangLioncash
2015-06-28Common: Fix FileUtil includes, and everything relying on those.Emmanuel Gil Peyrot
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot
2015-05-07Common: Remove common.hYuri Kunde Schlesner
2015-05-07Common: Move IO-specific compatibility macros to file_util.cppYuri Kunde Schlesner
2015-05-06Common: Remove many unnecessary cross-platform compatibility macrosYuri Kunde Schlesner
2015-02-25Common: Switch to the XDG Base Directory Specification for directory selection.Emmanuel Gil Peyrot
This allows for easily movable and independent configuration and data directories, using standardized paths.
2015-02-20Common: Change names containing “Dolphin” or “PPSSPP” to something ↵Emmanuel Gil Peyrot
more generic.
2015-01-03Archives: Changed the way paths are built for the archives.Subv
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
2015-01-02Archives: Change the folder layout of some archives.Subv
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
2015-01-02Archives: Reduced duplicate code in RomFS and SaveCheck.Subv
Fixed a few warnings and cleaned up the code
2014-12-29Archives: Implemented ExtSaveData and SharedExtSaveDataSubv
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.