mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
need to follow https://github.com/hanwen/go-fuse/blob/master/fuse/api.go
This commit is contained in:
parent
f87da798a4
commit
45a0fda9bd
|
@ -7,6 +7,7 @@ import (
|
||||||
"github.com/chrislusf/seaweedfs/weed/storage/types"
|
"github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||||
"github.com/chrislusf/seaweedfs/weed/util"
|
"github.com/chrislusf/seaweedfs/weed/util"
|
||||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||||
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
@ -49,6 +50,8 @@ type Option struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type WFS struct {
|
type WFS struct {
|
||||||
|
// follow https://github.com/hanwen/go-fuse/blob/master/fuse/api.go
|
||||||
|
fuse.RawFileSystem
|
||||||
fs.Inode
|
fs.Inode
|
||||||
option *Option
|
option *Option
|
||||||
metaCache *meta_cache.MetaCache
|
metaCache *meta_cache.MetaCache
|
||||||
|
@ -59,8 +62,9 @@ type WFS struct {
|
||||||
|
|
||||||
func NewSeaweedFileSystem(option *Option) *WFS {
|
func NewSeaweedFileSystem(option *Option) *WFS {
|
||||||
wfs := &WFS{
|
wfs := &WFS{
|
||||||
option: option,
|
RawFileSystem: fuse.NewDefaultRawFileSystem(),
|
||||||
signature: util.RandomInt32(),
|
option: option,
|
||||||
|
signature: util.RandomInt32(),
|
||||||
}
|
}
|
||||||
|
|
||||||
wfs.root = Directory{
|
wfs.root = Directory{
|
||||||
|
|
Loading…
Reference in a new issue