archive: keep timestamps when extracting

This commit is contained in:
Matthew Penner
2021-09-01 09:54:41 -06:00
parent 3b5e042ccc
commit 5cd43dd4c9
6 changed files with 31 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ import (
"io/fs"
"os"
"path"
"time"
"emperror.dev/errors"
"github.com/apex/log"
@@ -26,7 +27,7 @@ const (
// RestoreCallback is a generic restoration callback that exists for both local
// and remote backups allowing the files to be restored.
type RestoreCallback func(file string, r io.Reader, mode fs.FileMode) error
type RestoreCallback func(file string, r io.Reader, mode fs.FileMode, atime, mtime time.Time) error
// noinspection GoNameStartsWithPackageName
type BackupInterface interface {