summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
AgeCommit message (Collapse)Author
2021-01-27rename Common/File to Common/IOFileShawn Hoffman
2020-12-30Merge pull request #9318 from JosJuice/android-saf-gamesJosJuice
Android: Use storage access framework for game list
2020-12-24Core: Add new Free Look settings and configiwubcode
2020-12-20Android: Add content provider support to File::ScanDirectoryTreeJosJuice
2020-12-20Android: Add content provider support to File::FileInfoJosJuice
2020-12-05Add warning flags to File deletion functionsDentomologist
Adds a flag to File::Delete and File::DeleteDir functions to control whether a console warning is emitted when the file or directory doesn't exist. The flag is optional and true by default to match current behavior.
2020-12-03Change File::DeleteDir return valueDentomologist
Makes File::DeleteDir return true when attempting to delete a nonexistent path. The purpose of DeleteDir is to ensure the path doesn't exist after the call, which is better reflected by the new return value. Additionally, none of the current callers actually check the return value so this won't break any existing code.
2020-11-25Fix file rename errors on WindowsDentomologist
On Windows, when the Rename function fails to replace an existing file it will now retry the operation multiple times with increasingly long delays between attempts. This fixes transient rename failures. I've been getting sporadic yet annoyingly frequent errors saying: 'IOS_FS: Failed to rename temporary FST file' These typically appear on startup but I've also gotten them randomly. Investigation shows this happens when the Windows ReplaceFile function returns the error ERROR_UNABLE_TO_REMOVE_REPLACED. That happens in the context of using ReplaceFile to perform an atomic file overwrite, which is required when saving updates to a file to avoid corruption. The error mainly happens with the /Wii/fst.bin file but I've seen it happen with multiple other files as well. I haven't been able to definitively pin down why the error occurs, though online discussions suggest antivirus scanning may be a major culprit. That said, I've excluded the Dolphin folder from Windows Defender scans to no avail and don't have any other antivirus running, so this is likely to be a problem others are experiencing as well. The number and duration of retry delays is arbitrary but I feel like a combined second or so in the worst case is an acceptable tradeoff for the reduction (actually elimination in my experience) of those errors. This is even more true when you consider the time it takes to read and dismiss the error dialogs.
2020-10-26FileUtil: Fix format stringLéo Lam
Fixes a recent regression: https://github.com/dolphin-emu/dolphin/pull/9187#issuecomment-716835091
2020-10-23Common: Migrate logging to fmtLioncash
Continues the migration of our code over to the fmt logger.
2020-10-03InputCommon: Introducing the "Dynamic Input Texture". Configuration links ↵iwubcode
an emulated input action to an image based on what host key is defined for that emulated input. Specific regions are called out in configuration that mark where to replace an input button with a host key image.
2020-09-16Android: Add content provider support to File::DeleteJosJuice
2020-08-23FileUtil: handle some error conditionsShawn Hoffman
2020-07-08Common: Rename UTF16ToUTF8JosJuice
This function does *not* always convert from UTF-16. It converts from UTF-16 on Windows and UTF-32 on other operating systems. Also renaming UTF8ToUTF16 for consistency, even though it technically doesn't have the same problem since it only was implemented on Windows.
2019-11-09Merge pull request #8393 from CookiePLMonster/long-pathsLéo Lam
Support Windows 10 long paths
2019-10-28Merge pull request #8352 from ↵Pierre Bourdon
rlnilsen/motion-controller-support-via-cemuhook-protocol Support for motion controllers like the DualShock 4
2019-10-27Rename all instances of "CemuhookUDPServer"/"UDPServer" to ↵rlnilsen
"DualShockUDPClient"/"DSUClient".
2019-10-26Add support for motion controllers via the CemuHook controller input protocol.rlnilsen
This is done by: 1) Implementing said protocol in a new controller input class CemuHookUDPServer. 2) Adding functionality in the WiimoteEmu class for pushing that motion input to the emulated Wiimote and MotionPlus. 3) Suitably modifying the UI for configuring an Emulated Wii Remote.
2019-10-25Rebuild D_REDUMPCACHE_IDX path when neededJosJuice
2019-10-07Move GetModuleName to CommonSilent
This unifies GetModuleFileName calls between Dolphin and WinUpdater and allows to gracefully remove MAX_PATH limit from GetExePath
2019-10-07Remove MAX_PATH limit from:Silent
- GetTempFilenameForAtomicWrite - SetUserDirectory
2019-08-24VolumeVerifier: Add datfile parsingJosJuice
2019-05-29Common/FileUtil: Use std::string::data within ReadFileToStringLioncash
With C++17, .data() for std::string now has a non-const overload, so we can make use of that instead of taking the address of the first element.
2019-05-29Common/FileUtil: Use std::string_view with WriteStringToFileLioncash
Allows writing out other forms of strings (e.g. C strings) without the need to allocate a std::string and discard it after use.
2019-05-29Common/FileUtil: Make WriteStringToFile consistent with ReadFileToStringLioncash
Makes the parameter ordering consistent and less error-prone.
2019-05-05Revert "Core: Remove MemoryWatcher"Vlad Firoiu
This reverts commit 0c02e77eee0a12b178b11676ca548aeb1cbb7116.
2019-05-02Debugger/Memory: Add support for address spacesbooto
Different address spaces can be chosen in the memory view panel. * Effective (or virtual): Probably the view people mostly want. Address translation goes through MMU. * Auxiliary: ARAM address space. Does not display anything in Wii mode. * Physical: Physical address space. Only supports mem1 and mem2 (wii mode) so far.
2019-04-28Core: Remove MemoryWatcherTechjar
MemoryWatcher only works on Linux and affects emulation determinism due to scheduling additional events, which causes NetPlay to desync. Considering that this interface is a rather specialized use case, the communication with it is kinda crappy *and* it's affecting emulation, I think it's best to just axe it and come up with a better implementation of the functionality.
2019-02-26Common/FileUtil: Fix GetExePath() cutting off the bundle namespycrab
2019-02-06UICommon/AutoUpdate: Add macOS supportspycrab
2018-12-19Implement resource packsspycrab
2018-07-30Revert "Revert "Qt/GameList: Add option to show covers in grid mode""spycrab
2018-07-28Revert "Qt/GameList: Add option to show covers in grid mode"Pierre Bourdon
2018-07-27Qt/GameList: Add option to show covers in grid modespycrab
2018-06-06Give Dump Objects dedicated folder and tooltipRyan Meredith
2018-05-11FileUtil: Remove unnecessary IOFile GetHandle() call in ReadFileToString()Lioncash
We can just use IOFile's GetSize() function to do the same thing. While we're at it, get rid of unnecessary variables.
2018-05-08Qt: Allow custom stylesheetsspycrab
2018-05-04Win32/FileUtil: Fix IsDirectory() not working for certain directoriesspycrab
2018-05-02Remove code related to UI.iniJosJuice
We don't use it for anything, we just create it and leave it empty.
2018-03-23AutoUpdater: support optionally restarting Dolphin after updatePierre Bourdon
2018-03-14Assert: Uppercase assertion macrosLioncash
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
2017-12-26Android: Extract Sys to a different folder than the User folderJosJuice
2017-12-24Don't expose SYSDATA_DIR in a headerJosJuice
2017-08-25Fix regression in File::CopyDirJosJuice
This apparently fixes https://bugs.dolphin-emu.org/issues/10499 somehow. The first changed line of this commit is just for performance - the second changed line is where the difference in behavior is.
2017-08-22WFSI: Implement patch install finalization.Pierre Bourdon
2017-08-21FileUtil: Simplify File::Copy on non-Windows platformsLéo Lam
The old way of doing it is error prone and unnecessarily complex.
2017-08-21Revert "Try to fix File::Copy with non-1024-byte aligned sizes"Pierre Bourdon
2017-08-21Merge pull request #5939 from JonnyH/WIP/broken-fstream-copyMarkus Wick
Try to fix File::Copy with non-1024-byte aligned sizes
2017-08-18CommonFuncs: LastStrerrorString addedSepalani
2017-08-17Try to fix File::Copy with non-1024-byte aligned sizesJonathan Hamilton
ifstream::read() sets the failbit if trying to read over the end, which means that (!input) would be hit for the 'last' block if it wasn't exactly BSIZE (1024) bytes.