summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
AgeCommit message (Collapse)Author
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
2015-11-10Implement relocatable builds on LinuxMathieu Comandon
- Change the path of the Sys folder to the executable's location - Add LINUX_LOCAL_DEV flag to use relocatable version on Linux - Add CMake definition for relocatable build
2015-10-24GC controller input using named pipesspxtr
Currently only works on unix, but can be extended to other systems. Can also be extended to do wiimotes. Searches the Pipes folder for readable named pipes and creates a dolphin input device out of them. Send controller inputs to the game by writing to the file. Commands are described in Pipes.h.
2015-09-28Fix building with PCH disabled.Rohit Nirmal
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-08-26Fix VolumeDirectoryJosJuice
Fixes the regression from a225426 and clarifies a related comment.
2015-06-26GetExeDirectory() shouldn't return paths with /../ in the middle.Admiral H. Curtiss
2015-06-13Fix FreeBSD buildJeffrey Pfau
2015-05-28Add a mode to use a dummy Wii NAND.comex
Eventually, netplay will be able to use the host's NAND, but this could still be useful in some cases; for TAS it definitely makes sense to have a way to avoid using any preexisting NAND. In terms of implementation: remove D_WIIUSER_IDX, which was just WIIROOT + "/", as well as some other indices which are pointless to have as separate variables rather than just using the actual path (fixed, since they're actual Wii NAND paths) at the call site. Then split off D_SESSION_WIIROOT_IDX, which can point to the dummy NAND directory, from D_WIIROOT_IDX, which always points to the "real" one the user configured.
2015-05-28Fix CopyDir to not require source and dest paths to end with "/".comex
2015-05-28Rewrite FileSearch and improve ScanDirectoryTree.comex
- FileSearch is now just one function, and it converts the original glob into a regex on all platforms rather than relying on native Windows pattern matching on there and a complete hack elsewhere. It now supports recursion out of the box rather than manually expanding into a full list of directories in multiple call sites. - This adds a GCC >= 4.9 dependency due to older versions having outright broken <regex>. MSVC is fine with it. - ScanDirectoryTree returns the parent entry rather than filling parts of it in via reference. The count is now stored in the entry like it was for subdirectories. - .glsl file search is now done with DoFileSearch. - IOCTLV_READ_DIR now uses ScanDirectoryTree directly and sorts the results after replacements for better determinism.
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-04-15General: Apply the const specifier where applicableLioncash
2015-04-07Common: Remove TLS usage in GetLastErrorMsgdegasus
Just return std::string as this code isn't performance critical.
2015-03-17Fix Wii configuration path being incorrect.Ryan Houdek
On loading the NANDRoot from the config, if it isn't set it will still attempt to be set. So on the invalid empty path, just don't set it.
2015-03-15Fix user directories at times doing stupid things.Ryan Houdek
With my previous changes Dolphin would fail to create the user directory if it didn't exist, and would dump all the configuration options in to the cwdir. This was a bit more complicated to fix in a clean fashion, so I took to moving around code concerning user directories. Instead of having GetUserPath serve a dual purpose of both getting and setting our user directories, break out to a new SetUserPath function. GetUserPath will know only get the configured user path. SetUserPath will set our user paths and setup the internal user path state. This ending up being a lot cleaner overall, which is nice. Also less mind bending when attempting to read the code. So now we won't dump all of our configuration in to the cwdir if ~/.dolphin-emu isn't found. Fixes issue 8371.
2015-02-25Fix a bug on user path re-assignment.Ryan Houdek
The Load directory wasn't being properly reassigned when the user path changed, which causes a bunch of issues with things loading from the wrong place when using the -U option in Dolphin.
2015-02-25Move user directory detection location to UICommon.Ryan Houdek
The UI should decide on where it wants the user directory, not our core system. This is in anticipation of some upcoming work on Android which will need proper user directory setting.
2015-01-12Minor consistency changesStevoisiak
Mostly small changes, like capitalization and spelling
2014-12-20Merge pull request #1486 from rohit-n/gotoPierre Bourdon
Remove some gotos.
2014-12-11Fix hires texture path.Rachel Bryk
2014-12-01Common: Remove gotos in FileUtil, and replace FILE*s with IOFile/ifstreams.Rohit Nirmal
2014-10-22Read game title from ini file, or titles.txt if it exists.Rachel Bryk
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-08-30Common: Clean up brace placementsLioncash
2014-07-31Common: Simplify StripTailDirSlashesLioncash
2014-03-14Kill off some usages of c_str.Lioncash
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).