summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
AgeCommit message (Collapse)Author
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.
2017-06-29FileUtil: Add a class for Exists/IsDirectory/GetSizeJosJuice
Some code was calling more than one of these functions in a row (in particular, FileUtil.cpp itself did it a lot...), which is a waste since it's possible to call stat a single time and then read all three values from the stat struct. This commit adds a File::FileInfo class that calls stat once on construction and then lets Exists/IsDirectory/GetSize be executed very quickly. The performance improvement mostly matters for functions that can be handling a lot of files, such as File::ScanDirectoryTree. I've also done some cleanup in code that uses these functions. For instance, some code had checks like !Exists() || !IsDirectory(), which is functionally equivalent to !IsDirectory(), and some code was using File::GetSize even though there was an IOFile object that the code could call GetSize on.
2017-06-16FileUtil: Use errno for printing errors in IsDirectoryLéo Lam
stat() returns an error code in errno on both POSIX compliant platforms and Windows. This means we should always use errno instead of GetLastErrorMsg which uses GetLastError() (Win32) on Windows.
2017-06-16FileUtil: Don't manually strip trailing slashesLéo Lam
POSIX allows one or more trailing slashes for directories. From POSIX.1-2008, section 3.271 (Base Definitions / Pathname): > A pathname can optionally contain one or more trailing <slash> > characters. Multiple successive <slash> characters are considered to > be the same as one <slash>, except for the case of exactly two > leading <slash> characters. On Windows, the extra trailing slashes are ignored for directories too.
2017-06-15Move IOFile to a separate fileJosJuice
Reduces the number of files that need to be recompiled when making changes to FileUtil.h.
2017-06-07do not assign in conditional statementsShawn Hoffman
2017-06-07fix various instances of -1 being assigned to unsigned typesShawn Hoffman
2017-02-16Add some missing INI files to FileUtilRyan Houdek
2017-02-05Copy Wii save for current game for Netplay and TASChris Burgener
2017-01-23Add includes for building on Windows without PCHMichael Maltese
2017-01-14CommonPaths: Add D_WFSROOT_IDX.Pierre Bourdon
Defaults to $USERDIR/WFS. Used to store the contents normally stored on WFS mass storage devices.
2017-01-12IOFile: Get rid of IOFile's ReleaseHandle functionLioncash
Transfer of handles should be done via std::move.