fs: remove file.Name() from interface
The only user was archiver.fileSaver.
This commit is contained in:
parent
26b77a543d
commit
352605d9f0
2 changed files with 1 additions and 6 deletions
|
@ -232,7 +232,7 @@ func (r *readerFile) Close() error {
|
||||||
var _ File = &readerFile{}
|
var _ File = &readerFile{}
|
||||||
|
|
||||||
// fakeFile implements all File methods, but only returns errors for anything
|
// fakeFile implements all File methods, but only returns errors for anything
|
||||||
// except Stat() and Name().
|
// except Stat()
|
||||||
type fakeFile struct {
|
type fakeFile struct {
|
||||||
name string
|
name string
|
||||||
os.FileInfo
|
os.FileInfo
|
||||||
|
@ -257,10 +257,6 @@ func (f fakeFile) Stat() (os.FileInfo, error) {
|
||||||
return f.FileInfo, nil
|
return f.FileInfo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f fakeFile) Name() string {
|
|
||||||
return f.name
|
|
||||||
}
|
|
||||||
|
|
||||||
// fakeDir implements Readdirnames and Readdir, everything else is delegated to fakeFile.
|
// fakeDir implements Readdirnames and Readdir, everything else is delegated to fakeFile.
|
||||||
type fakeDir struct {
|
type fakeDir struct {
|
||||||
entries []os.FileInfo
|
entries []os.FileInfo
|
||||||
|
|
|
@ -34,5 +34,4 @@ type File interface {
|
||||||
|
|
||||||
Readdirnames(n int) ([]string, error)
|
Readdirnames(n int) ([]string, error)
|
||||||
Stat() (os.FileInfo, error)
|
Stat() (os.FileInfo, error)
|
||||||
Name() string
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue