dep ensure
This commit is contained in:
parent
1158ac4760
commit
c8c18403e4
371 changed files with 168673 additions and 1 deletions
49
vendor/github.com/hanwen/go-fuse/fuse/pathfs/loopback_linux.go
generated
vendored
Normal file
49
vendor/github.com/hanwen/go-fuse/fuse/pathfs/loopback_linux.go
generated
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
// Copyright 2016 the Go-FUSE Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package pathfs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/hanwen/go-fuse/fuse"
|
||||
)
|
||||
|
||||
func (fs *loopbackFileSystem) ListXAttr(name string, context *fuse.Context) ([]string, fuse.Status) {
|
||||
data, err := listXAttr(fs.GetPath(name))
|
||||
|
||||
return data, fuse.ToStatus(err)
|
||||
}
|
||||
|
||||
func (fs *loopbackFileSystem) RemoveXAttr(name string, attr string, context *fuse.Context) fuse.Status {
|
||||
err := sysRemovexattr(fs.GetPath(name), attr)
|
||||
return fuse.ToStatus(err)
|
||||
}
|
||||
|
||||
func (fs *loopbackFileSystem) String() string {
|
||||
return fmt.Sprintf("LoopbackFs(%s)", fs.Root)
|
||||
}
|
||||
|
||||
func (fs *loopbackFileSystem) GetXAttr(name string, attr string, context *fuse.Context) ([]byte, fuse.Status) {
|
||||
data := make([]byte, 1024)
|
||||
data, err := getXAttr(fs.GetPath(name), attr, data)
|
||||
|
||||
return data, fuse.ToStatus(err)
|
||||
}
|
||||
|
||||
func (fs *loopbackFileSystem) SetXAttr(name string, attr string, data []byte, flags int, context *fuse.Context) fuse.Status {
|
||||
err := syscall.Setxattr(fs.GetPath(name), attr, data, flags)
|
||||
return fuse.ToStatus(err)
|
||||
}
|
||||
|
||||
// Utimens - path based version of loopbackFile.Utimens()
|
||||
func (fs *loopbackFileSystem) Utimens(path string, a *time.Time, m *time.Time, context *fuse.Context) (code fuse.Status) {
|
||||
var ts [2]syscall.Timespec
|
||||
ts[0] = fuse.UtimeToTimespec(a)
|
||||
ts[1] = fuse.UtimeToTimespec(m)
|
||||
err := sysUtimensat(0, fs.GetPath(path), &ts, _AT_SYMLINK_NOFOLLOW)
|
||||
return fuse.ToStatus(err)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue