restoreFile function
Designed to work with backupFile to restore
a file from backup.
The existing file is deleted and restored
from the .bak/<filename>.bak file created when
you called backupFile.
Consider using withFileProtectionAsync for a more robust solution.
When the last .bak file is restored, the .bak directory
will be deleted. If you don't restore all files (your app crashes)
then a .bak directory and files may be left hanging around and you may
need to manually restore these files.
If the backup file doesn't exists this function throws
a RestoreFileException unless you pass the ignoreMissing
flag.
@Throwing(ArgumentError)
@Throwing(CopyException)
@Throwing(DeleteDirException)
@Throwing(DeleteException)
@Throwing(MoveException)
@Throwing(RestoreFileException)
Implementation
void restoreFile(String pathToFile, {bool ignoreMissing = false}) =>
core.restoreFile(pathToFile, ignoreMissing: ignoreMissing);