This implementation creates a temporary file (suffixed with .tmp) and
renames it to the expected file name when the file is closed.
If the renaming fails, the destination file is removed and renaming is
tried again to handle cases where renaming over an existing file is not
supported by the underlying OS.
When creating an atomic write stream, the file is only created once it
is closed.
This can be done using a temporary file.
This commit only adds the API but not the proper implementation.
* Include directory nodes in FSList sent to detectGames
- This is required for correct detection of toon.
* Don't add / at the end of directories found in getChildren
- It looks like that behaviour was removed from posix-fs a long
time ago, and now there's apparently code depending on directories
_not_ having a / at the end of their name...
* Treat games detected in subdirs as duplicates
- This is a workaround for a detection bug in toon; it will incorrectly
detect the game in the MISC subdirectory as well.
* Don't avoid directories called "install" in the game selector
- I don't know if the original reason for ignoring "install" is still
valid, but the code for doing do so was broken anyway.
short-circuit any call to openForWriting(). Also, directories and
non-existing files can't be opened for reading either, so just
return 0 for those.
svn-id: r34621