Commit 2851c510 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

zipfs: remove unused data type ZipFile

parent 6560fb0d
...@@ -6,10 +6,8 @@ package zipfs ...@@ -6,10 +6,8 @@ package zipfs
import ( import (
"archive/zip" "archive/zip"
"bytes"
"context" "context"
"fmt" "fmt"
"io"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
...@@ -21,28 +19,6 @@ import ( ...@@ -21,28 +19,6 @@ import (
"github.com/hanwen/go-fuse/nodefs" "github.com/hanwen/go-fuse/nodefs"
) )
type ZipFile struct {
*zip.File
}
func (f *ZipFile) Stat(out *fuse.Attr) {
}
func (f *ZipFile) Data() []byte {
zf := (*f)
rc, err := zf.Open()
if err != nil {
panic(err)
}
dest := bytes.NewBuffer(make([]byte, 0, f.UncompressedSize))
_, err = io.CopyN(dest, rc, int64(f.UncompressedSize))
if err != nil {
panic(err)
}
return dest.Bytes()
}
type zipRoot struct { type zipRoot struct {
nodefs.Inode nodefs.Inode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment