var GOROOT … // OS returns an implementation of FileSystem reading from the // tree rooted at root. Recording a root is convenient everywhere // but necessary on Windows, because the slash-separated path // passed to Open has no way to specify a drive letter. Using a root // lets code refer to OS(`c:\`), OS(`d:\`) and so on. func OS(root string) FileSystem { … } type osFS … func isGoPath(path string) bool { … } func (root osFS) String() string { … } // RootType returns the root type for the filesystem. // // Note that we ignore the path argument because roottype is a property of // this filesystem. But for other filesystems, the roottype might need to be // dynamically deduced at call time. func (root osFS) RootType(path string) RootType { … } func (root osFS) resolve(path string) string { … } func (root osFS) Open(path string) (ReadSeekCloser, error) { … } func (root osFS) Lstat(path string) (os.FileInfo, error) { … } func (root osFS) Stat(path string) (os.FileInfo, error) { … } func (root osFS) ReadDir(path string) ([]os.FileInfo, error) { … }