/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/kbfs/libfuse/alias.go
40 строк
1017 B
chrisnojima-zoom
Version 670 - clean2 (#29122)
08 июн 2026, 19:31
Не верифицирован
08 июн 2026, 19:31
1943197
Код
Авторство
О чём код?
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. // //go:build !windows package libfuse import ( "context" "os" "bazil.org/fuse" "bazil.org/fuse/fs" ) // Alias represents an alias. A use case for it is a top-level folder accessed // through its non-canonical name. type Alias struct { // The real path this alias points to. In case of TLF alias, this is the // canonical name for the folder. realPath string inode uint64 } var _ fs.Node = (*Alias)(nil) // Attr implements the fs.Node interface for Alias. func (*Alias) Attr(ctx context.Context, a *fuse.Attr) error { a.Mode = os.ModeSymlink | 0o777 // Aliases can't be moved, so let bazil generate an inode. return nil } var _ fs.NodeReadlinker = (*Alias)(nil) // Readlink implements the fs.NodeReadlinker interface for Alias. func (a *Alias) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error) { return a.realPath, nil }