Enable StatFS on dynamicfs

MacOS apparently invokes StatFS on os.Lstat/os.Stat. Note that the
return fields are not actually populated here.
geesefs-0-30-9
Ben Sidhom 2017-05-08 14:27:10 -07:00 committed by Aaron Jacobs
parent 8edb6e4462
commit 6a1014cd27
1 changed files with 40 additions and 36 deletions

View File

@ -1,20 +1,20 @@
package dynamicfs package dynamicfs
import ( import (
"strings" "fmt"
"io" "io"
"log"
"os"
"strings"
"sync"
"time"
"golang.org/x/net/context" "golang.org/x/net/context"
"github.com/jacobsa/timeutil"
"github.com/jacobsa/fuse" "github.com/jacobsa/fuse"
"github.com/jacobsa/fuse/fuseutil"
"github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseops"
"os" "github.com/jacobsa/fuse/fuseutil"
"fmt" "github.com/jacobsa/timeutil"
"log"
"sync"
"time"
) )
// Create a file system that contains 2 files (`age` and `weekday`) and no directories. Every time // Create a file system that contains 2 files (`age` and `weekday`) and no directories. Every time
@ -131,7 +131,6 @@ func (fs *dynamicFS) findUnusedHandle() fuseops.HandleID {
handle++ handle++
} }
fs.nextHandle = handle + 1 fs.nextHandle = handle + 1
log.Printf("Minting new handle: %d", handle)
return handle return handle
} }
@ -275,3 +274,8 @@ func (fs *dynamicFS) ReleaseFileHandle(
delete(fs.fileHandles, op.Handle) delete(fs.fileHandles, op.Handle)
return return
} }
func (fs *dynamicFS) StatFS(ctx context.Context,
op *fuseops.StatFSOp) (err error) {
return
}