本文整理匯總了Golang中github.com/hanwen/go-fuse/fuse/nodefs.File.Utimens方法的典型用法代碼示例。如果您正苦於以下問題:Golang File.Utimens方法的具體用法?Golang File.Utimens怎麽用?Golang File.Utimens使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/hanwen/go-fuse/fuse/nodefs.File
的用法示例。
在下文中一共展示了File.Utimens方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Utimens
func (n *pathInode) Utimens(file nodefs.File, atime *time.Time, mtime *time.Time, context *fuse.Context) (code fuse.Status) {
// Note that Linux currently (Linux 4.4) DOES NOT pass a file descriptor
// to FUSE for futimens. We still check because it may change in the future.
if file != nil {
code = file.Utimens(atime, mtime)
if code != fuse.ENOSYS {
return code
}
}
files := n.Inode().Files(fuse.O_ANYWRITE)
for _, f := range files {
// TODO - pass context
code = f.Utimens(atime, mtime)
if code.Ok() {
return code
}
}
if len(files) == 0 || code == fuse.ENOSYS || code == fuse.EBADF {
code = n.fs.Utimens(n.GetPath(), atime, mtime, context)
}
return code
}