Documentation ¶
Index ¶
- type Cascade
- func (c Cascade) Append(filename string) (File, error)
- func (c Cascade) Close() (last error)
- func (c Cascade) Create(filename string) (File, error)
- func (c Cascade) FirstWritable() Writer
- func (c Cascade) MkdirAll(dir string) error
- func (c Cascade) Open(filename string) (File, error)
- func (c Cascade) ReadDir(dir string) ([]FileInfo, error)
- func (c Cascade) ReadFile(filename string) ([]byte, error)
- func (c Cascade) ReadOnly() bool
- func (c Cascade) Remove(name string) error
- func (c Cascade) Stat(name string) (FileInfo, error)
- func (c Cascade) Truncate(name string, size int64) error
- func (c Cascade) WriteFile(filename string, data []byte) error
- type File
- type FileInfo
- type FileMode
- type FileSystem
- func (fs FileSystem) Append(filename string) (File, error)
- func (fs FileSystem) Close() error
- func (fs FileSystem) Create(filename string) (File, error)
- func (fs FileSystem) MkdirAll(dir string) error
- func (fs FileSystem) Open(filename string) (file File, err error)
- func (fs FileSystem) ReadDir(dir string) ([]FileInfo, error)
- func (fs FileSystem) ReadFile(filename string) (b []byte, err error)
- func (fs FileSystem) ReadOnly() bool
- func (fs FileSystem) Remove(name string) error
- func (fs FileSystem) Stat(name string) (info FileInfo, err error)
- func (fs FileSystem) Truncate(name string, size int64) error
- func (fs FileSystem) WriteFile(filename string, data []byte) error
- type Memory
- type Reader
- type Writer
- type Zip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File interface { io.ReadWriteCloser }
type FileSystem ¶
func (FileSystem) Append ¶
func (fs FileSystem) Append(filename string) (File, error)
Append open file in append mode, create is not exist
func (FileSystem) Close ¶
func (fs FileSystem) Close() error
func (FileSystem) Create ¶
func (fs FileSystem) Create(filename string) (File, error)
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR. If there is an error, it will be of type *PathError.
func (FileSystem) MkdirAll ¶
func (fs FileSystem) MkdirAll(dir string) error
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error.
func (FileSystem) Open ¶
func (fs FileSystem) Open(filename string) (file File, err error)
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY. If there is an error, it will be of type *PathError.
func (FileSystem) ReadDir ¶
func (fs FileSystem) ReadDir(dir string) ([]FileInfo, error)
ReadDir reads the directory named by dirname and returns a list of directory entries sorted by filename.
func (FileSystem) ReadFile ¶
func (fs FileSystem) ReadFile(filename string) (b []byte, err error)
ReadFile reads the file named by filename and returns the contents. A successful call returns err == nil, not err == EOF. Because ReadFile reads the whole file, it does not treat an EOF from Read as an error to be reported.
func (FileSystem) ReadOnly ¶
func (fs FileSystem) ReadOnly() bool
func (FileSystem) Remove ¶
func (fs FileSystem) Remove(name string) error
Remove removes the named file or directory. If there is an error, it will be of type *PathError.
func (FileSystem) Stat ¶
func (fs FileSystem) Stat(name string) (info FileInfo, err error)
Stat returns a FileInfo describing the named file. If there is an error, it will be of type *PathError.