Convenience class providing standard implementations for librepcb::TransactionalFileSystem::RestoreCallback.
More...
#include <transactionalfilesystem.h>
|
| static bool | no (const FilePath &dir) |
| | Never restore a backup.
|
| |
| static bool | yes (const FilePath &dir) |
| | Always restore the backup, if there is any.
|
| |
| static bool | abort (const FilePath &dir) |
| | If there exists a backup, abort opening the directory by raising an exception.
|
| |
Convenience class providing standard implementations for librepcb::TransactionalFileSystem::RestoreCallback.
- Note
- This is a class just to put some functions into their own scope.
◆ no()
Never restore a backup.
- Parameters
-
| dir | The directory to be opened. |
- Returns
- false
◆ yes()
Always restore the backup, if there is any.
- Parameters
-
| dir | The directory to be opened. |
- Returns
- true
◆ abort()
| static bool abort |
( |
const FilePath & |
dir | ) |
|
|
inlinestatic |
If there exists a backup, abort opening the directory by raising an exception.
- Parameters
-
| dir | The directory to be opened. |
- Returns
- Nothing, since an exception is thrown.
- Exceptions
-
The documentation for this struct was generated from the following file: