type FS … // ValidPath reports whether the given path name // is valid for use in a call to Open. // // Path names passed to open are UTF-8-encoded, // unrooted, slash-separated sequences of path elements, like “x/y/z”. // Path names must not contain an element that is “.” or “..” or the empty string, // except for the special case that the root directory is named “.”. // Paths must not start or end with a slash: “/x” and “x/” are invalid. // // Note that paths are slash-separated on all systems, even Windows. // Paths containing other characters such as backslash and colon // are accepted as valid, but those characters must never be // interpreted by an [FS] implementation as path element separators. func ValidPath(name string) bool { … } type File … type DirEntry … type ReadDirFile … var ErrInvalid … var ErrPermission … var ErrExist … var ErrNotExist … var ErrClosed … func errInvalid() error { … } func errPermission() error { … } func errExist() error { … } func errNotExist() error { … } func errClosed() error { … } type FileInfo … type FileMode … const ModeDir … const ModeAppend … const ModeExclusive … const ModeTemporary … const ModeSymlink … const ModeDevice … const ModeNamedPipe … const ModeSocket … const ModeSetuid … const ModeSetgid … const ModeCharDevice … const ModeSticky … const ModeIrregular … const ModeType … const ModePerm … func (m FileMode) String() string { … } // IsDir reports whether m describes a directory. // That is, it tests for the [ModeDir] bit being set in m. func (m FileMode) IsDir() bool { … } // IsRegular reports whether m describes a regular file. // That is, it tests that no mode type bits are set. func (m FileMode) IsRegular() bool { … } // Perm returns the Unix permission bits in m (m & [ModePerm]). func (m FileMode) Perm() FileMode { … } // Type returns type bits in m (m & [ModeType]). func (m FileMode) Type() FileMode { … } type PathError … func (e *PathError) Error() string { … } func (e *PathError) Unwrap() error { … } // Timeout reports whether this error represents a timeout. func (e *PathError) Timeout() bool { … }