Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
e9498b6b
Commit
e9498b6b
authored
Aug 02, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import v2 API
Change-Id: I811c6a070bfdc3582da816f302354f4a7516beab
parent
578bd2e3
Changes
107
Hide whitespace changes
Inline
Side-by-side
Showing
107 changed files
with
225 additions
and
222 deletions
+225
-222
benchmark/stat_test.go
benchmark/stat_test.go
+3
-3
benchmark/statfs.go
benchmark/statfs.go
+2
-2
example/autounionfs/main.go
example/autounionfs/main.go
+4
-4
example/hello/main.go
example/hello/main.go
+2
-2
example/loopback/main.go
example/loopback/main.go
+1
-1
example/memfs/main.go
example/memfs/main.go
+2
-2
example/multizip/main.go
example/multizip/main.go
+2
-2
example/statfs/main.go
example/statfs/main.go
+3
-3
example/unionfs/main.go
example/unionfs/main.go
+3
-3
example/zipfs/main.go
example/zipfs/main.go
+2
-2
fs/api.go
fs/api.go
+1
-1
fs/bridge.go
fs/bridge.go
+2
-2
fs/cache_test.go
fs/cache_test.go
+1
-1
fs/constants.go
fs/constants.go
+1
-1
fs/directio_example_test.go
fs/directio_example_test.go
+2
-2
fs/directio_test.go
fs/directio_test.go
+1
-1
fs/dirstream.go
fs/dirstream.go
+1
-1
fs/dirstream_darwin.go
fs/dirstream_darwin.go
+1
-1
fs/dirstream_linux.go
fs/dirstream_linux.go
+1
-1
fs/dynamic_example_test.go
fs/dynamic_example_test.go
+2
-2
fs/example_test.go
fs/example_test.go
+2
-2
fs/files.go
fs/files.go
+1
-1
fs/files_linux.go
fs/files_linux.go
+1
-1
fs/inmemory_example_test.go
fs/inmemory_example_test.go
+2
-2
fs/inode.go
fs/inode.go
+1
-1
fs/interrupt_test.go
fs/interrupt_test.go
+1
-1
fs/loopback.go
fs/loopback.go
+1
-1
fs/loopback_darwin.go
fs/loopback_darwin.go
+2
-2
fs/loopback_linux_test.go
fs/loopback_linux_test.go
+2
-2
fs/mem.go
fs/mem.go
+1
-1
fs/mem_test.go
fs/mem_test.go
+2
-2
fs/mount.go
fs/mount.go
+1
-1
fs/readonly_test.go
fs/readonly_test.go
+1
-1
fs/readwrite_handleless_example_test.go
fs/readwrite_handleless_example_test.go
+2
-2
fs/simple_test.go
fs/simple_test.go
+3
-3
fs/zip_test.go
fs/zip_test.go
+1
-1
fs/zipfs_example_test.go
fs/zipfs_example_test.go
+2
-2
fuse/nodefs/api.go
fuse/nodefs/api.go
+2
-2
fuse/nodefs/defaultfile.go
fuse/nodefs/defaultfile.go
+1
-1
fuse/nodefs/defaultnode.go
fuse/nodefs/defaultnode.go
+1
-1
fuse/nodefs/dir.go
fuse/nodefs/dir.go
+1
-1
fuse/nodefs/fileless_test.go
fuse/nodefs/fileless_test.go
+2
-2
fuse/nodefs/files.go
fuse/nodefs/files.go
+1
-1
fuse/nodefs/files_darwin.go
fuse/nodefs/files_darwin.go
+2
-2
fuse/nodefs/files_linux.go
fuse/nodefs/files_linux.go
+1
-1
fuse/nodefs/files_test.go
fuse/nodefs/files_test.go
+2
-2
fuse/nodefs/fsconnector.go
fuse/nodefs/fsconnector.go
+1
-1
fuse/nodefs/fsmount.go
fuse/nodefs/fsmount.go
+1
-1
fuse/nodefs/fsops.go
fuse/nodefs/fsops.go
+1
-1
fuse/nodefs/fuse.go
fuse/nodefs/fuse.go
+1
-1
fuse/nodefs/inode.go
fuse/nodefs/inode.go
+1
-1
fuse/nodefs/lockingfile.go
fuse/nodefs/lockingfile.go
+1
-1
fuse/nodefs/memnode.go
fuse/nodefs/memnode.go
+1
-1
fuse/nodefs/memnode_test.go
fuse/nodefs/memnode_test.go
+2
-2
fuse/pathfs/api.go
fuse/pathfs/api.go
+3
-3
fuse/pathfs/copy.go
fuse/pathfs/copy.go
+1
-1
fuse/pathfs/copy_test.go
fuse/pathfs/copy_test.go
+1
-1
fuse/pathfs/default.go
fuse/pathfs/default.go
+2
-2
fuse/pathfs/locking.go
fuse/pathfs/locking.go
+2
-2
fuse/pathfs/loopback.go
fuse/pathfs/loopback.go
+3
-3
fuse/pathfs/loopback_darwin.go
fuse/pathfs/loopback_darwin.go
+2
-2
fuse/pathfs/loopback_linux.go
fuse/pathfs/loopback_linux.go
+1
-1
fuse/pathfs/loopback_test.go
fuse/pathfs/loopback_test.go
+2
-2
fuse/pathfs/owner_test.go
fuse/pathfs/owner_test.go
+3
-3
fuse/pathfs/pathfs.go
fuse/pathfs/pathfs.go
+2
-2
fuse/pathfs/prefixfs.go
fuse/pathfs/prefixfs.go
+2
-2
fuse/pathfs/readonlyfs.go
fuse/pathfs/readonlyfs.go
+2
-2
fuse/pathfs/xattr_test.go
fuse/pathfs/xattr_test.go
+3
-3
fuse/splice_linux.go
fuse/splice_linux.go
+1
-1
fuse/test/cache_test.go
fuse/test/cache_test.go
+7
-7
fuse/test/cachecontrol_test.go
fuse/test/cachecontrol_test.go
+3
-3
fuse/test/defaultnode_test.go
fuse/test/defaultnode_test.go
+3
-3
fuse/test/defaultread_test.go
fuse/test/defaultread_test.go
+4
-4
fuse/test/delete_linux_test.go
fuse/test/delete_linux_test.go
+3
-3
fuse/test/file_lock_test.go
fuse/test/file_lock_test.go
+3
-3
fuse/test/fsetattr_test.go
fuse/test/fsetattr_test.go
+4
-4
fuse/test/loopback_linux_test.go
fuse/test/loopback_linux_test.go
+1
-1
fuse/test/loopback_test.go
fuse/test/loopback_test.go
+4
-4
fuse/test/mount_test.go
fuse/test/mount_test.go
+4
-4
fuse/test/nil_file_truncation_test.go
fuse/test/nil_file_truncation_test.go
+3
-3
fuse/test/node_test.go
fuse/test/node_test.go
+3
-3
fuse/test/nofile_test.go
fuse/test/nofile_test.go
+3
-3
fuse/test/notify_linux_test.go
fuse/test/notify_linux_test.go
+4
-4
fuse/test/umask_test.go
fuse/test/umask_test.go
+4
-4
fuse/test/xattr_test.go
fuse/test/xattr_test.go
+3
-3
go.mod
go.mod
+1
-0
go.sum
go.sum
+2
-0
internal/testutil/helpers.go
internal/testutil/helpers.go
+1
-1
internal/utimens/utimens_darwin.go
internal/utimens/utimens_darwin.go
+1
-1
newunionfs/unionfs.go
newunionfs/unionfs.go
+2
-2
newunionfs/unionfs_test.go
newunionfs/unionfs_test.go
+4
-4
posixtest/test.go
posixtest/test.go
+1
-1
unionfs/autounion.go
unionfs/autounion.go
+3
-3
unionfs/autounion_test.go
unionfs/autounion_test.go
+4
-4
unionfs/cachingfs.go
unionfs/cachingfs.go
+3
-3
unionfs/cachingfs_test.go
unionfs/cachingfs_test.go
+3
-3
unionfs/create.go
unionfs/create.go
+1
-1
unionfs/dircache.go
unionfs/dircache.go
+2
-2
unionfs/unionfs.go
unionfs/unionfs.go
+3
-3
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+5
-5
unionfs/unionfs_xattr_test.go
unionfs/unionfs_xattr_test.go
+4
-4
zipfs/multizip.go
zipfs/multizip.go
+2
-2
zipfs/multizip_test.go
zipfs/multizip_test.go
+3
-3
zipfs/tarfs.go
zipfs/tarfs.go
+2
-2
zipfs/tarfs_test.go
zipfs/tarfs_test.go
+2
-2
zipfs/zipfs.go
zipfs/zipfs.go
+2
-2
zipfs/zipfs_test.go
zipfs/zipfs_test.go
+3
-3
No files found.
benchmark/stat_test.go
View file @
e9498b6b
...
...
@@ -17,9 +17,9 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
setupFs
(
node
fs
.
InodeEmbedder
,
N
int
)
(
string
,
func
())
{
...
...
benchmark/statfs.go
View file @
e9498b6b
...
...
@@ -10,8 +10,8 @@ import (
"strings"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
StatFS
struct
{
...
...
example/autounionfs/main.go
View file @
e9498b6b
...
...
@@ -10,10 +10,10 @@ import (
"os"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/unionfs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
unionfs"
)
func
main
()
{
...
...
example/hello/main.go
View file @
e9498b6b
...
...
@@ -12,8 +12,8 @@ import (
"log"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
HelloRoot
struct
{
...
...
example/loopback/main.go
View file @
e9498b6b
...
...
@@ -18,7 +18,7 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/
v2/
fs"
)
func
writeMemProfile
(
fn
string
,
sigs
<-
chan
os
.
Signal
)
{
...
...
example/memfs/main.go
View file @
e9498b6b
...
...
@@ -11,8 +11,8 @@ import (
"fmt"
"os"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
)
func
main
()
{
...
...
example/multizip/main.go
View file @
e9498b6b
...
...
@@ -15,8 +15,8 @@ import (
"path/filepath"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/zipfs"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
zipfs"
)
func
main
()
{
...
...
example/statfs/main.go
View file @
e9498b6b
...
...
@@ -20,9 +20,9 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/benchmark"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
benchmark"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
main
()
{
...
...
example/unionfs/main.go
View file @
e9498b6b
...
...
@@ -11,9 +11,9 @@ import (
"os"
"time"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/unionfs"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
unionfs"
)
func
main
()
{
...
...
example/zipfs/main.go
View file @
e9498b6b
...
...
@@ -18,8 +18,8 @@ import (
"strings"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/zipfs"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
zipfs"
)
func
main
()
{
...
...
fs/api.go
View file @
e9498b6b
...
...
@@ -171,7 +171,7 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// InodeEmbedder is an interface for structs that embed Inode.
...
...
fs/bridge.go
View file @
e9498b6b
...
...
@@ -11,8 +11,8 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal"
)
func
errnoToStatus
(
errno
syscall
.
Errno
)
fuse
.
Status
{
...
...
fs/cache_test.go
View file @
e9498b6b
...
...
@@ -13,7 +13,7 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
keepCacheFile
struct
{
...
...
fs/constants.go
View file @
e9498b6b
...
...
@@ -7,7 +7,7 @@ package fs
import
(
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// OK is the Errno return value to indicate absense of errors.
...
...
fs/directio_example_test.go
View file @
e9498b6b
...
...
@@ -11,8 +11,8 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// bytesFileHandle is a file handle that carries separate content for
...
...
fs/directio_test.go
View file @
e9498b6b
...
...
@@ -12,7 +12,7 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
dioRoot
struct
{
...
...
fs/dirstream.go
View file @
e9498b6b
...
...
@@ -7,7 +7,7 @@ package fs
import
(
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
dirArray
struct
{
...
...
fs/dirstream_darwin.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"os"
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
NewLoopbackDirStream
(
nm
string
)
(
DirStream
,
syscall
.
Errno
)
{
...
...
fs/dirstream_linux.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"syscall"
"unsafe"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
loopbackDirStream
struct
{
...
...
fs/dynamic_example_test.go
View file @
e9498b6b
...
...
@@ -11,8 +11,8 @@ import (
"strconv"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// numberNode is a filesystem node representing an integer. Prime
...
...
fs/example_test.go
View file @
e9498b6b
...
...
@@ -10,8 +10,8 @@ import (
"log"
"os"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// ExampleMount shows how to create a loopback file system, and
...
...
fs/files.go
View file @
e9498b6b
...
...
@@ -12,7 +12,7 @@ import (
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
"golang.org/x/sys/unix"
)
...
...
fs/files_linux.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
(
f
*
loopbackFile
)
Allocate
(
ctx
context
.
Context
,
off
uint64
,
sz
uint64
,
mode
uint32
)
syscall
.
Errno
{
...
...
fs/inmemory_example_test.go
View file @
e9498b6b
...
...
@@ -12,8 +12,8 @@ import (
"strings"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// files contains the files we will expose as a file system
...
...
fs/inode.go
View file @
e9498b6b
...
...
@@ -14,7 +14,7 @@ import (
"syscall"
"unsafe"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
parentData
struct
{
...
...
fs/interrupt_test.go
View file @
e9498b6b
...
...
@@ -11,7 +11,7 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
interruptRoot
struct
{
...
...
fs/loopback.go
View file @
e9498b6b
...
...
@@ -10,7 +10,7 @@ import (
"path/filepath"
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
loopbackRoot
struct
{
...
...
fs/loopback_darwin.go
View file @
e9498b6b
...
...
@@ -12,8 +12,8 @@ import (
"time"
"unsafe"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/utimens"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/utimens"
)
func
(
n
*
loopbackNode
)
Getxattr
(
ctx
context
.
Context
,
attr
string
,
dest
[]
byte
)
(
uint32
,
syscall
.
Errno
)
{
...
...
fs/loopback_linux_test.go
View file @
e9498b6b
...
...
@@ -14,8 +14,8 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
"github.com/kylelemons/godebug/pretty"
"golang.org/x/sys/unix"
)
...
...
fs/mem.go
View file @
e9498b6b
...
...
@@ -8,7 +8,7 @@ import (
"context"
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// MemRegularFile is a filesystem node that holds a read-only data
...
...
fs/mem_test.go
View file @
e9498b6b
...
...
@@ -13,8 +13,8 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
testMount
(
t
*
testing
.
T
,
root
InodeEmbedder
,
opts
*
Options
)
(
string
,
*
fuse
.
Server
,
func
())
{
...
...
fs/mount.go
View file @
e9498b6b
...
...
@@ -7,7 +7,7 @@ package fs
import
(
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// Mount mounts the given NodeFS on the directory, and starts serving
...
...
fs/readonly_test.go
View file @
e9498b6b
...
...
@@ -10,7 +10,7 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
TestReadonlyCreate
(
t
*
testing
.
T
)
{
...
...
fs/readwrite_handleless_example_test.go
View file @
e9498b6b
...
...
@@ -12,8 +12,8 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// bytesNode is a file that can be read and written
...
...
fs/simple_test.go
View file @
e9498b6b
...
...
@@ -15,9 +15,9 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/posixtest"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
"github.com/hanwen/go-fuse/
v2/
posixtest"
)
type
testCase
struct
{
...
...
fs/zip_test.go
View file @
e9498b6b
...
...
@@ -14,7 +14,7 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/
v2/
fs"
)
var
testData
=
map
[
string
]
string
{
...
...
fs/zipfs_example_test.go
View file @
e9498b6b
...
...
@@ -17,8 +17,8 @@ import (
"sync"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// zipFile is a file read from a zip archive.
...
...
fuse/nodefs/api.go
View file @
e9498b6b
...
...
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// This package is deprecated. New projects should use the package
// "github.com/hanwen/go-fuse/fs" instead.
// "github.com/hanwen/go-fuse/
v2/
fs" instead.
//
// The nodefs package offers a high level API that resembles the
// kernel's idea of what an FS looks like. File systems can have
...
...
@@ -15,7 +15,7 @@ package nodefs
import
(
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// The Node interface implements the user-defined file system
...
...
fuse/nodefs/defaultfile.go
View file @
e9498b6b
...
...
@@ -7,7 +7,7 @@ package nodefs
import
(
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
defaultFile
struct
{}
...
...
fuse/nodefs/defaultnode.go
View file @
e9498b6b
...
...
@@ -7,7 +7,7 @@ package nodefs
import
(
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// NewDefaultNode returns an implementation of Node that returns
...
...
fuse/nodefs/dir.go
View file @
e9498b6b
...
...
@@ -8,7 +8,7 @@ import (
"log"
"sync"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
connectorDir
struct
{
...
...
fuse/nodefs/fileless_test.go
View file @
e9498b6b
...
...
@@ -8,8 +8,8 @@ import (
"io/ioutil"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
nodeReadNode
struct
{
...
...
fuse/nodefs/files.go
View file @
e9498b6b
...
...
@@ -10,7 +10,7 @@ import (
"sync"
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// DataFile is for implementing read-only filesystems. This
...
...
fuse/nodefs/files_darwin.go
View file @
e9498b6b
...
...
@@ -9,8 +9,8 @@ import (
"time"
"unsafe"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/utimens"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/utimens"
)
func
(
f
*
loopbackFile
)
Allocate
(
off
uint64
,
sz
uint64
,
mode
uint32
)
fuse
.
Status
{
...
...
fuse/nodefs/files_linux.go
View file @
e9498b6b
...
...
@@ -8,7 +8,7 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
(
f
*
loopbackFile
)
Allocate
(
off
uint64
,
sz
uint64
,
mode
uint32
)
fuse
.
Status
{
...
...
fuse/nodefs/files_test.go
View file @
e9498b6b
...
...
@@ -10,8 +10,8 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
// Check that loopbackFile.Utimens() works as expected
...
...
fuse/nodefs/fsconnector.go
View file @
e9498b6b
...
...
@@ -16,7 +16,7 @@ import (
"time"
"unsafe"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// Tests should set to true.
...
...
fuse/nodefs/fsmount.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"sync"
"unsafe"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// openedFile stores either an open dir or an open file.
...
...
fuse/nodefs/fsops.go
View file @
e9498b6b
...
...
@@ -13,7 +13,7 @@ import (
"strings"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// Returns the RawFileSystem so it can be mounted.
...
...
fuse/nodefs/fuse.go
View file @
e9498b6b
...
...
@@ -5,7 +5,7 @@
package
nodefs
import
(
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// Mount mounts a filesystem with the given root node on the given directory.
...
...
fuse/nodefs/inode.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"log"
"sync"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
parentData
struct
{
...
...
fuse/nodefs/lockingfile.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"sync"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
lockingFile
struct
{
...
...
fuse/nodefs/memnode.go
View file @
e9498b6b
...
...
@@ -11,7 +11,7 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// NewMemNodeFSRoot creates an in-memory node-based filesystem. Files
...
...
fuse/nodefs/memnode_test.go
View file @
e9498b6b
...
...
@@ -10,8 +10,8 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
const
testTtl
=
100
*
time
.
Millisecond
...
...
fuse/pathfs/api.go
View file @
e9498b6b
...
...
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// This package is deprecated. New projects should use the package
// "github.com/hanwen/go-fuse/fs" instead.
// "github.com/hanwen/go-fuse/
v2/
fs" instead.
//
// Package pathfs provides a file system API expressed in filenames.
package
pathfs
...
...
@@ -11,8 +11,8 @@ package pathfs
import
(
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
)
// A filesystem API that uses paths rather than inodes. A minimal
...
...
fuse/pathfs/copy.go
View file @
e9498b6b
...
...
@@ -7,7 +7,7 @@ package pathfs
import
(
"os"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
CopyFile
(
srcFs
,
destFs
FileSystem
,
srcFile
,
destFile
string
,
context
*
fuse
.
Context
)
fuse
.
Status
{
...
...
fuse/pathfs/copy_test.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"os"
"testing"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
TestCopyFile
(
t
*
testing
.
T
)
{
...
...
fuse/pathfs/default.go
View file @
e9498b6b
...
...
@@ -7,8 +7,8 @@ package pathfs
import
(
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
)
// NewDefaultFileSystem creates a filesystem that responds ENOSYS for
...
...
fuse/pathfs/locking.go
View file @
e9498b6b
...
...
@@ -8,8 +8,8 @@ import (
"sync"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
)
type
lockingFileSystem
struct
{
...
...
fuse/pathfs/loopback.go
View file @
e9498b6b
...
...
@@ -11,9 +11,9 @@ import (
"path/filepath"
"syscall"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal"
)
type
loopbackFileSystem
struct
{
...
...
fuse/pathfs/loopback_darwin.go
View file @
e9498b6b
...
...
@@ -8,8 +8,8 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/utimens"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/utimens"
)
func
(
fs
*
loopbackFileSystem
)
Utimens
(
path
string
,
a
*
time
.
Time
,
m
*
time
.
Time
,
context
*
fuse
.
Context
)
fuse
.
Status
{
...
...
fuse/pathfs/loopback_linux.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
(
fs
*
loopbackFileSystem
)
ListXAttr
(
name
string
,
context
*
fuse
.
Context
)
([]
string
,
fuse
.
Status
)
{
...
...
fuse/pathfs/loopback_test.go
View file @
e9498b6b
...
...
@@ -12,8 +12,8 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
// Check that loopbackFileSystem.Utimens() works as expected
...
...
fuse/pathfs/owner_test.go
View file @
e9498b6b
...
...
@@ -9,9 +9,9 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
ownerFs
struct
{
...
...
fuse/pathfs/pathfs.go
View file @
e9498b6b
...
...
@@ -12,8 +12,8 @@ import (
"sync"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
)
// refCountedInode is used in clientInodeMap. The reference count is used to decide
...
...
fuse/pathfs/prefixfs.go
View file @
e9498b6b
...
...
@@ -9,8 +9,8 @@ import (
"path/filepath"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
)
// PrefixFileSystem adds a path prefix to incoming calls.
...
...
fuse/pathfs/readonlyfs.go
View file @
e9498b6b
...
...
@@ -8,8 +8,8 @@ import (
"fmt"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
)
// NewReadonlyFileSystem returns a wrapper that only exposes read-only
...
...
fuse/pathfs/xattr_test.go
View file @
e9498b6b
...
...
@@ -13,9 +13,9 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
var
xattrGolden
=
map
[
string
][]
byte
{
...
...
fuse/splice_linux.go
View file @
e9498b6b
...
...
@@ -8,7 +8,7 @@ import (
"fmt"
"os"
"github.com/hanwen/go-fuse/splice"
"github.com/hanwen/go-fuse/
v2/
splice"
)
func
(
s
*
Server
)
setSplice
()
{
...
...
fuse/test/cache_test.go
View file @
e9498b6b
...
...
@@ -14,10 +14,10 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
cacheFs
struct
{
...
...
@@ -54,7 +54,7 @@ func setupCacheTest(t *testing.T) (string, *pathfs.PathNodeFs, func()) {
}
opts
:=
nodefs
.
NewOptions
()
opts
.
AttrTimeout
=
10
*
time
.
Millisecond
opts
.
AttrTimeout
=
10
*
time
.
Millisecond
opts
.
Debug
=
testutil
.
VerboseTest
()
state
,
_
,
err
:=
nodefs
.
Mount
(
dir
+
"/mnt"
,
pfs
.
Root
(),
mntOpts
,
opts
)
if
err
!=
nil
{
...
...
@@ -121,7 +121,7 @@ func TestFopenKeepCache(t *testing.T) {
}
// sleep a bit to make sure mtime of file for before and after are different
time
.
Sleep
(
20
*
time
.
Millisecond
)
time
.
Sleep
(
20
*
time
.
Millisecond
)
xwriteFile
(
wd
+
"/orig/file.txt"
,
after
)
mtimeAfter
:=
xstat
(
wd
+
"/orig/file.txt"
)
.
ModTime
()
...
...
@@ -134,7 +134,7 @@ func TestFopenKeepCache(t *testing.T) {
//
// this way we make sure the kernel knows updated size/mtime before we
// try to read the file next time.
time
.
Sleep
(
100
*
time
.
Millisecond
)
time
.
Sleep
(
100
*
time
.
Millisecond
)
_
=
xstat
(
wd
+
"/mnt/file.txt"
)
c
=
xreadFile
(
wd
+
"/mnt/file.txt"
)
...
...
fuse/test/cachecontrol_test.go
View file @
e9498b6b
...
...
@@ -15,9 +15,9 @@ import (
"golang.org/x/sys/unix"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
// DataNode is a nodefs.Node that Reads static data.
...
...
fuse/test/defaultnode_test.go
View file @
e9498b6b
...
...
@@ -10,9 +10,9 @@ import (
"path"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
TestDefaultNodeGetAttr
(
t
*
testing
.
T
)
{
...
...
fuse/test/defaultread_test.go
View file @
e9498b6b
...
...
@@ -9,10 +9,10 @@ import (
"os"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
DefaultReadFS
struct
{
...
...
fuse/test/delete_linux_test.go
View file @
e9498b6b
...
...
@@ -13,9 +13,9 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
flipNode
struct
{
...
...
fuse/test/file_lock_test.go
View file @
e9498b6b
...
...
@@ -15,9 +15,9 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
TestFlockExclusive
(
t
*
testing
.
T
)
{
...
...
fuse/test/fsetattr_test.go
View file @
e9498b6b
...
...
@@ -10,10 +10,10 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
MutableDataFile
struct
{
...
...
fuse/test/loopback_linux_test.go
View file @
e9498b6b
...
...
@@ -13,7 +13,7 @@ import (
"golang.org/x/sys/unix"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
TestTouch
(
t
*
testing
.
T
)
{
...
...
fuse/test/loopback_test.go
View file @
e9498b6b
...
...
@@ -18,10 +18,10 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
testCase
struct
{
...
...
fuse/test/mount_test.go
View file @
e9498b6b
...
...
@@ -12,10 +12,10 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
TestMountOnExisting
(
t
*
testing
.
T
)
{
...
...
fuse/test/nil_file_truncation_test.go
View file @
e9498b6b
...
...
@@ -8,9 +8,9 @@ import (
"os"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
truncatableFile
struct
{
...
...
fuse/test/node_test.go
View file @
e9498b6b
...
...
@@ -9,9 +9,9 @@ import (
"sync"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
rootNode
struct
{
...
...
fuse/test/nofile_test.go
View file @
e9498b6b
...
...
@@ -10,9 +10,9 @@ import (
"sync/atomic"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
// exercise functionality when open returns 0 file handle.
...
...
fuse/test/notify_linux_test.go
View file @
e9498b6b
...
...
@@ -9,10 +9,10 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
NotifyFs
struct
{
...
...
fuse/test/umask_test.go
View file @
e9498b6b
...
...
@@ -10,10 +10,10 @@ import (
"os/exec"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
umaskFS
struct
{
...
...
fuse/test/xattr_test.go
View file @
e9498b6b
...
...
@@ -12,9 +12,9 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
// this file is linux-only, since it uses syscall.Getxattr.
...
...
go.mod
View file @
e9498b6b
module github.com/hanwen/go-fuse/v2
require (
github.com/hanwen/go-fuse v1.0.0
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522
)
go.sum
View file @
e9498b6b
github.com/hanwen/go-fuse v1.0.0 h1:GxS9Zrn6c35/BnfiVsZVWmsG803xwE7eVRDvcf/BEVc=
github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 h1:Ve1ORMCxvRmSXBwJK+t3Oy+V2vRW2OetUQBq4rJIkZE=
...
...
internal/testutil/helpers.go
View file @
e9498b6b
...
...
@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// Check that loopback Utimens() works as expected.
...
...
internal/utimens/utimens_darwin.go
View file @
e9498b6b
...
...
@@ -8,7 +8,7 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// timeToTimeval converts time.Time to syscall.Timeval
...
...
newunionfs/unionfs.go
View file @
e9498b6b
...
...
@@ -13,8 +13,8 @@ import (
"path/filepath"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
func
filePathHash
(
path
string
)
string
{
...
...
newunionfs/unionfs_test.go
View file @
e9498b6b
...
...
@@ -13,10 +13,10 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/posixtest"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
"github.com/hanwen/go-fuse/
v2/
posixtest"
)
type
testCase
struct
{
...
...
posixtest/test.go
View file @
e9498b6b
...
...
@@ -16,7 +16,7 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
var
All
=
map
[
string
]
func
(
*
testing
.
T
,
string
){
...
...
unionfs/autounion.go
View file @
e9498b6b
...
...
@@ -15,9 +15,9 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
)
type
knownFs
struct
{
...
...
unionfs/autounion_test.go
View file @
e9498b6b
...
...
@@ -10,10 +10,10 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
const
entryTTL
=
100
*
time
.
Millisecond
...
...
unionfs/cachingfs.go
View file @
e9498b6b
...
...
@@ -10,9 +10,9 @@ import (
"strings"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
)
const
_XATTRSEP
=
"@XATTR@"
...
...
unionfs/cachingfs_test.go
View file @
e9498b6b
...
...
@@ -9,9 +9,9 @@ import (
"syscall"
"testing"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
modeMapEq
(
m1
,
m2
map
[
string
]
uint32
)
bool
{
...
...
unionfs/create.go
View file @
e9498b6b
...
...
@@ -7,7 +7,7 @@ package unionfs
import
(
"os"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
)
func
NewUnionFsFromRoots
(
roots
[]
string
,
opts
*
UnionFsOptions
,
roCaching
bool
)
(
pathfs
.
FileSystem
,
error
)
{
...
...
unionfs/dircache.go
View file @
e9498b6b
...
...
@@ -8,8 +8,8 @@ import (
"sync"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
)
// newDirnameMap reads the contents of the given directory. On error,
...
...
unionfs/unionfs.go
View file @
e9498b6b
...
...
@@ -16,9 +16,9 @@ import (
"syscall"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
)
func
filePathHash
(
path
string
)
string
{
...
...
unionfs/unionfs_test.go
View file @
e9498b6b
...
...
@@ -18,11 +18,11 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/posixtest"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
"github.com/hanwen/go-fuse/
v2/
posixtest"
)
func
TestFilePathHash
(
t
*
testing
.
T
)
{
...
...
unionfs/unionfs_xattr_test.go
View file @
e9498b6b
...
...
@@ -10,10 +10,10 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
fuse/nodefs"
"github.com/hanwen/go-fuse/
v2/
fuse/pathfs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
type
TestFS
struct
{
...
...
zipfs/multizip.go
View file @
e9498b6b
...
...
@@ -19,8 +19,8 @@ import (
"log"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// MultiZipFs is a filesystem that mounts zipfiles.
...
...
zipfs/multizip_test.go
View file @
e9498b6b
...
...
@@ -10,9 +10,9 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
const
testTtl
=
100
*
time
.
Millisecond
...
...
zipfs/tarfs.go
View file @
e9498b6b
...
...
@@ -17,8 +17,8 @@ import (
"strings"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
// TODO - handle symlinks.
...
...
zipfs/tarfs_test.go
View file @
e9498b6b
...
...
@@ -16,8 +16,8 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
var
tarContents
=
map
[
string
]
string
{
...
...
zipfs/zipfs.go
View file @
e9498b6b
...
...
@@ -15,8 +15,8 @@ import (
"sync"
"syscall"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
)
type
zipRoot
struct
{
...
...
zipfs/zipfs_test.go
View file @
e9498b6b
...
...
@@ -13,9 +13,9 @@ import (
"testing"
"time"
"github.com/hanwen/go-fuse/fs"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/
v2/
fs"
"github.com/hanwen/go-fuse/
v2/
fuse"
"github.com/hanwen/go-fuse/
v2/
internal/testutil"
)
func
testZipFile
()
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment