go/src/embed/embed.go

type FS

// split splits the name into dir and elem as described in the
// comment in the FS struct above. isDir reports whether the
// final trailing slash was present, indicating that name is a directory.
func split(name string) (dir, elem string, isDir bool) {}

var _

var _

type file

var _

var _

func (f *file) Name() string               {}

func (f *file) Size() int64                {}

func (f *file) ModTime() time.Time         {}

func (f *file) IsDir() bool                {}

func (f *file) Sys() any                   {}

func (f *file) Type() fs.FileMode          {}

func (f *file) Info() (fs.FileInfo, error) {}

func (f *file) Mode() fs.FileMode {}

func (f *file) String() string {}

var dotFile

// lookup returns the named file, or nil if it is not present.
func (f FS) lookup(name string) *file {}

// readDir returns the list of files corresponding to the directory dir.
func (f FS) readDir(dir string) []file {}

// Open opens the named file for reading and returns it as an [fs.File].
//
// The returned file implements [io.Seeker] and [io.ReaderAt] when the file is not a directory.
func (f FS) Open(name string) (fs.File, error) {}

// ReadDir reads and returns the entire named directory.
func (f FS) ReadDir(name string) ([]fs.DirEntry, error) {}

// ReadFile reads and returns the content of the named file.
func (f FS) ReadFile(name string) ([]byte, error) {}

type openFile

var _

var _

func (f *openFile) Close() error               {}

func (f *openFile) Stat() (fs.FileInfo, error) {}

func (f *openFile) Read(b []byte) (int, error) {}

func (f *openFile) Seek(offset int64, whence int) (int64, error) {}

func (f *openFile) ReadAt(b []byte, offset int64) (int, error) {}

type openDir

func (d *openDir) Close() error               {}

func (d *openDir) Stat() (fs.FileInfo, error) {}

func (d *openDir) Read([]byte) (int, error) {}

func (d *openDir) ReadDir(count int) ([]fs.DirEntry, error) {}

// sortSearch is like sort.Search, avoiding an import.
func sortSearch(n int, f func(int) bool) int {}