Reads filePath, validating with validate. If the main file is missing or corrupted and a valid backup exists, restores the main file from the backup (with a warning) and returns the backup content. Returns undefined when neither source is usable.
filePath
validate
Reads
filePath, validating withvalidate. If the main file is missing or corrupted and a valid backup exists, restores the main file from the backup (with a warning) and returns the backup content. Returns undefined when neither source is usable.