fs: move NodeFromFileInfo into FS interface

This commit is contained in:
Michael Eischer
2024-08-28 10:58:07 +02:00
parent c3b3120e10
commit 75711446e1
12 changed files with 69 additions and 41 deletions

View File

@@ -3,6 +3,8 @@ package fs
import (
"os"
"path/filepath"
"github.com/restic/restic/internal/restic"
)
// Local is the local file system. Most methods are just passed on to the stdlib.
@@ -57,6 +59,10 @@ func (fs Local) ExtendedStat(fi os.FileInfo) ExtendedFileInfo {
return ExtendedStat(fi)
}
func (fs Local) NodeFromFileInfo(path string, fi os.FileInfo, ignoreXattrListError bool) (*restic.Node, error) {
return nodeFromFileInfo(path, fi, ignoreXattrListError)
}
// Join joins any number of path elements into a single path, adding a
// Separator if necessary. Join calls Clean on the result; in particular, all
// empty strings are ignored. On Windows, the result is a UNC path if and only