LibrePCB Developers Documentation
TransactionalFileSystem::RestoreMode Struct Reference

Convenience class providing standard implementations for librepcb::TransactionalFileSystem::RestoreCallback. More...

#include <transactionalfilesystem.h>

+ Collaboration diagram for TransactionalFileSystem::RestoreMode:

Static Public Member Functions

static bool no (const FilePath &dir)
 Never restore a backup. More...
 
static bool yes (const FilePath &dir)
 Always restore the backup, if there is any. More...
 
static bool abort (const FilePath &dir)
 If there exists a backup, abort opening the directory by raising an exception. More...
 

Detailed Description

Convenience class providing standard implementations for librepcb::TransactionalFileSystem::RestoreCallback.

Note
This is a class just to put some functions into their own scope.

Member Function Documentation

◆ no()

static bool no ( const FilePath dir)
inlinestatic

Never restore a backup.

Parameters
dirThe directory to be opened.
Returns
false
+ Here is the caller graph for this function:

◆ yes()

static bool yes ( const FilePath dir)
inlinestatic

Always restore the backup, if there is any.

Parameters
dirThe 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
dirThe directory to be opened.
Returns
Nothing, since an exception is thrown.
Exceptions
librepcb::RuntimeError
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this struct was generated from the following file: