mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +00:00
fs: remove file.Name() from interface
The only user was archiver.fileSaver.
This commit is contained in:
parent
0c711f5605
commit
a7b13bd603
@ -229,7 +229,7 @@ func (r *readerFile) Close() error {
|
||||
var _ File = &readerFile{}
|
||||
|
||||
// fakeFile implements all File methods, but only returns errors for anything
|
||||
// except Stat() and Name().
|
||||
// except Stat()
|
||||
type fakeFile struct {
|
||||
name string
|
||||
os.FileInfo
|
||||
@ -266,10 +266,6 @@ func (f fakeFile) Stat() (os.FileInfo, error) {
|
||||
return f.FileInfo, nil
|
||||
}
|
||||
|
||||
func (f fakeFile) Name() string {
|
||||
return f.name
|
||||
}
|
||||
|
||||
// fakeDir implements Readdirnames and Readdir, everything else is delegated to fakeFile.
|
||||
type fakeDir struct {
|
||||
entries []os.FileInfo
|
||||
|
@ -34,5 +34,4 @@ type File interface {
|
||||
Readdir(int) ([]os.FileInfo, error)
|
||||
Seek(int64, int) (int64, error)
|
||||
Stat() (os.FileInfo, error)
|
||||
Name() string
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user