summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
AgeCommit message (Collapse)Author
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.
2017-01-04IOFile: Make the move constructor and move assignment operator noexceptLioncash
Certain parts of the standard library try to determine whether or not a transfer operation should either be a copy or a move. The prevalent notion of move constructors/assignment operators is that they should not throw, they simply move an already existing resource somewhere else. This is typically done with 'std::move_if_noexcept'. Like the name says, if a type's move constructor is noexcept, then the functions retrieves an r-value reference (for move semantics), or an l-value (for copy semantics) if it is not noexcept. As IOFile deletes the copy constructor and copy assignment operators, using IOFile with certain parts of the standard library can fail in unexcepted ways (especially when used with various container implementations). This prevents that.
2016-12-25Merge pull request #4550 from linkmauve/no-readdir_rMat M
Common: Replace deprecated readdir_r with readdir
2016-12-25Fix outdated comments in ScanDirectoryTreeJosJuice
2016-12-24Common: Replace deprecated readdir_r with readdirEmmanuel Gil Peyrot
Fixes a warning under recent glibc.
2016-11-26Revert "IOS HLE: Prevent accessing host file system"JosJuice
This reverts commit 141f3bfb3acee73569486258c21e4ed34fc32327. The implementation of getting absolute paths wasn't working on non-Windows systems, which is a huge problem for IOS HLE.
2016-11-13IOS HLE: Prevent accessing host file systemJosJuice
2016-10-03Merge pull request #2868 from sepalani/dolphin_sslshuffle2
Dolphin new Dump SSL features
2016-07-18Merge pull request #3859 from Aestek/feature/netplay-md5Anthony Serna
Netplay: add md5 testing
2016-07-17Use the standard stat()/fstat() interfaces, not nonstandard *64().Anthony 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-07-16Add Wii sdcard to CommonPathsAestek
2016-07-01Added: more SSL features, plus SSL dump folderSepalani
Dump: rootca, peercert
2016-06-30Fall back to default theme when the configured theme doesn't existJosJuice
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-04-25make DeleteDirRecursively clean up correctly after failure.Scott Mansell
Fixes Metroid prime crashing the second boot after loading a save state (issue 9496)
2016-01-21Correct ampersands as wellmathieui
2016-01-21More asterisksmathieui
2016-01-21Common: asterisks go against the type namemathieui
not the variable name
2015-12-29Add support for sending game memory changes to outside processesspxtr
2015-11-12Merge pull request #2304 from linkmauve/xdg-basedirMarkus Wick
UICommon: Respect XDG Base Directory Specification on POSIX systems
2015-11-10FileUtil: Move ShaderCache to the Cache directory.Emmanuel Gil Peyrot