本文整理汇总了Golang中github.com/ipfs/go-ipfs/Godeps/_workspace/src/bazil/org/fuse.Errno函数的典型用法代码示例。如果您正苦于以下问题:Golang Errno函数的具体用法?Golang Errno怎么用?Golang Errno使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Errno函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Readlink
func (s *Node) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error) {
if s.cached.GetType() != ftpb.Data_Symlink {
return "", fuse.Errno(syscall.EINVAL)
}
return string(s.cached.GetData()), nil
}
示例2: Create
func (createrDir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error) {
// pick a really distinct error, to identify it later
return nil, nil, fuse.Errno(syscall.ENAMETOOLONG)
}
示例3: Errno
func (panicSentinel) Errno() fuse.Errno {
return fuse.Errno(syscall.ENAMETOOLONG)
}
示例4: Root
func (badRootFS) Root() (fs.Node, error) {
// pick a really distinct error, to identify it later
return nil, fuse.Errno(syscall.ENAMETOOLONG)
}
示例5: Attr
func (attrBad) Attr(ctx context.Context, attr *fuse.Attr) error {
return fuse.Errno(syscall.ENAMETOOLONG)
}
示例6: Lookup
func (f customErrNode) Lookup(ctx context.Context, name string) (fs.Node, error) {
return nil, myCustomError{
ErrorNumber: fuse.Errno(syscall.ENAMETOOLONG),
}
}
示例7: Open
func (f *open) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) {
f.Opens.Open(ctx, req, resp)
// pick a really distinct error, to identify it later
return nil, fuse.Errno(syscall.ENAMETOOLONG)
}