32 Commits
Author SHA1 Message Date
Le Philousophe fdd11d0714 BACKENDS: FS: Implement atomic file write for stdio stream backend
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.
2024-10-15 22:45:50 +02:00
Le Philousophe e61dac6c68 BACKENDS: Allow write streams to be created atomically
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.
2024-10-15 22:45:50 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh b11c5ace90 BACKENDS: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:31:41 +02:00
Le Philousophe a318d14b66 DREAMCAST: Fix build by defining missing function
Function has been defined pure virtual in 8c86319923
2021-08-24 19:08:46 +02:00
Cameron Cawley 423f4cce6b BACKENDS: Add override and final keywords 2021-08-12 15:16:48 +01:00
Paul Gilbert 9db14ee109 BACKENDS: Update all the backends to support SeekableWriteStream 2021-08-08 18:13:30 -07:00
Cameron Cawley db445bfc87 BACKENDS: Improve AbstractFSNode::createDirectory() stubs 2019-08-06 07:17:29 +03:00
Cameron Cawley 66ef50cfeb BACKENDS: Rename and simplify AbstractFSNode::create() 2019-08-06 07:17:29 +03:00
Adrian Frühwirth 9bee9e1ba6 JANITORIAL: Fix whitespace 2018-04-19 12:08:31 +02:00
D G Turner 4c03760e66 DC: Fix Variable Shadowing Compiler Warning. 2017-01-17 09:29:24 +00:00
Alexander Tkachev ac93dd99fe DC: Add RoninCDFileNode::create()
Returns false, as we don't create files/directories on CD.
2016-08-31 13:46:43 +06:00
Johannes Schickel b4e5531352 DC: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Marcus Comstedt 62828f86a1 DC: Workaround for usleep prototype mismatch 2014-01-10 15:56:51 +01:00
Christoph Mallon a78b2d777d JANITORIAL: Remove extra semicolons. 2011-11-27 12:54:22 +01:00
Christoph Mallon 23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Marcus Comstedt 5b2e90504c DC: Directory handling fixes
* 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.
2011-07-17 20:59:07 +02:00
Max Horn 72080d8972 DC: Allow use of all symbols 2011-06-06 23:04:32 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn 2fa63ca015 COMMON: Forbid use of getcwd&getwd; add macro to enable unistd.h compatibility 2011-05-03 14:30:25 +02:00
Max Horn d67e450f7a DC: Fix various forbidden symbol clashes 2011-05-03 11:56:10 +02:00
Max Horn 8f16458e9b Renamed FSNode::openForReading / openForWriting to createReadStream / createWriteStream, again to make ownership of the returned stream clear
svn-id: r36014
2009-01-23 03:41:36 +00:00
Eugene Sandulenko 696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Max Horn c7fde102e3 Renamed FilesystemNode -> FSNode
svn-id: r34716
2008-10-02 16:58:59 +00:00
Marcus Comstedt 727b220d25 In the CD filesystem, nothing can be opened for writing, so just
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
2008-09-20 16:47:31 +00:00
Max Horn 7f18aaf8ec Pushed AbstractFilesystemNode::openForReading() / openForWriting() impls out to backends
svn-id: r34304
2008-09-03 12:56:46 +00:00
Max Horn 531bcf847c Moved FilesystemNode / FSList to namespace Common; also got rid of some 'typedef Common::String String;' name aliases
svn-id: r34302
2008-09-03 11:22:51 +00:00
Max Horn cb21c25e41 FSNode code: Merged most versions of lastPathComponent() into one new AbstractFilesystemNode::lastPathComponent() method, with customizable path separator character
svn-id: r34197
2008-08-27 20:31:22 +00:00
Max Horn 3ec5658d00 code formatting cleanup
svn-id: r34096
2008-08-22 11:17:12 +00:00
Marcus Comstedt affff7d395 Code cleanup.
svn-id: r31414
2008-04-05 23:30:12 +00:00
Marcus Comstedt 4d45121ccf Integrated fs factory into osystem object.
svn-id: r31024
2008-03-01 17:48:42 +00:00
Marcus Comstedt 964caae2dd Moved Dreamcast filesystem factory to platform directory.
svn-id: r31021
2008-03-01 15:45:54 +00:00