Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plan9: add io/fs.FS implementation #100

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anastasop
Copy link

An implementation of io/fs.FS for 9p. Tested with http.FileServer.

From https://pkg.go.dev/io#Reader

Implementations of Read are discouraged from returning a zero byte count
with a nil error, except when len(p) == 0. Callers should treat a return
return of 0 and nil as indicating that nothing happened;
in particular it does not indicate EOF.
Tests run only on linux and need u9fs (https://github.com/unofficial-mirror/u9fs).
Runs with go test -tags u9fs
mode |= fs.ModeDir
}

// The following are not defined by 9p (http://9p.io/sys/man/5/INDEX.html)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These file modes are provided by an informal protocol extension called 9p2000.u. The file modes only need to be checked if use of 9p2000.u was agreed after protocol version negotiation. See version(9p).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants