Documentation ¶
Overview ¶
Package os provides an io.FS that is implemented using the os package.
Index ¶
- func WithFlags(flags int) jsfs.OFOption
- type FS
- func (f *FS) Glob(pattern string) (matches []string, err error)
- func (f *FS) Open(name string) (fs.File, error)
- func (f *FS) OpenFile(name string, perms fs.FileMode, options ...jsfs.OFOption) (fs.File, error)
- func (f *FS) ReadDir(name string) ([]fs.DirEntry, error)
- func (f *FS) ReadFile(name string) ([]byte, error)
- func (f *FS) Stat(name string) (fs.FileInfo, error)
- func (f *FS) WriteFile(name string, content []byte, perm fs.FileMode) error
- type File
- func (f *File) Close() error
- func (f *File) OSFile() *os.File
- func (f *File) Read(b []byte) (n int, err error)
- func (f *File) ReadDir(n int) ([]fs.DirEntry, error)
- func (f *File) Seek(offset int64, whence int) (ret int64, err error)
- func (f *File) Stat() (fs.FileInfo, error)
- func (f *File) Write(b []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FS ¶
type FS struct{}
FS implemements fs.ReadDirFS/StatFS/ReadFileFS/GlobFS using functions defined in the "os" and "filepath" packages. In addition we support github.com/johnsiilver/fs/OpenFiler to allow for writing files.
func (*FS) OpenFile ¶
OpenFile opens a file with the set flags and fs.FileMode. If you want to use the fs.File to write, you need to type assert if to *os.File. If Opening a file for
Click to show internal directories.
Click to hide internal directories.