aboutsummaryrefslogtreecommitdiffstats
path: root/src/AtomicFile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix formattingJoel Rosdahl2020-02-101-1/+1
|
* Improve the failed() and fatal() mechanismsJoel Rosdahl2020-02-081-1/+1
| | | | | | | | | | The failure() and fatal() functions now exit by throwing exceptions that are caught by the top level functions. This makes it possible to “throw Failure” in functions that don’t have access to orig_args (or the future context object). While at it, renamed top-level functions to better reflect their purpose.
* Split ccache.hpp into per-.cpp file headersJoel Rosdahl2020-01-221-2/+1
| | | | This reduces code dependencies that hamper refactoring.
* AtomicFile: Cope with write error (e.g. due to full disk) when closingJoel Rosdahl2019-11-011-1/+6
|
* Use #include "third_party/..." consistently to include third party codeJoel Rosdahl2019-10-191-1/+2
|
* Rename AtomicFile::close to commitJoel Rosdahl2019-10-051-2/+2
| | | | This better conveys the semantics.
* Include .tmp. in AtomicFile namesJoel Rosdahl2019-10-051-1/+1
| | | | | This makes it possible to use AtomicFile for files in the cache directory without having to add a “.tmp” interfix explicitly.
* Use UpperCamelCase instead of snake_case for namespacesJoel Rosdahl2019-10-051-1/+2
| | | | This makes Foo::bar work for both a namespace Foo and a class Foo.
* Make AtomicFile::Type values lower caseJoel Rosdahl2019-10-051-1/+1
|
* Extract temporary file creation code into a functionJoel Rosdahl2019-10-051-19/+11
| | | | | Also, use cstdio instead of iostream since that will be needed in upcoming commits to get hold on the underlying file descriptor.
* Add AtomicFile class for updating a file with rename-in-placeJoel Rosdahl2019-08-141-0/+80