Documentation ¶
Index ¶
- func AppendFile(file string, data []byte) error
- func CheckDir(dir string) (err error)
- func CheckFile(filepath string) (err error)
- func Chmod(filepath string, mode os.FileMode) error
- func Copy(src string, target string) (err error)
- func LStat(path string) (info os.FileInfo, err error)
- func Lchown(path string, uid int, gid int) error
- func Mkdir(dir string) (err error)
- func Move(src string, target string) (err error)
- func OuputFile(filepath string, data []byte) error
- func PathExists(path string) (isExist bool)
- func ReadDir(dir string) (files []string, err error)
- func ReadFile(filepath string) ([]byte, error)
- func ReadStream(filepath string) (stream io.Reader, err error)
- func Remove(path string) error
- func Rename(oldPath string, newPath string) error
- func Stat(path string) (info os.FileInfo, err error)
- func TempDir(dir string, prefix string) (string, error)
- func Truncate(filepath string, len int64) error
- func WriteFile(filepath string, data []byte) error
- func WriteStream(filepath string) (stream io.Writer, err error)
- type FileSystem
- func (fileSystem FileSystem) Delete(path string) error
- func (fileSystem FileSystem) Get(path string) (*os.File, error)
- func (fileSystem FileSystem) GetFullPath(path string) string
- func (fileSystem FileSystem) GetStream(path string)
- func (fileSystem FileSystem) List(path string) ([]*ofs.Object, error)
- func (fileSystem FileSystem) Put(path string, reader io.Reader) (*ofs.Object, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶
func OuputFile ¶
Almost the same as writeFile (i.e. it overwrites), except that if the parent directory does not exist, it's created.
func ReadStream ¶
Create a read stream
Types ¶
type FileSystem ¶
type FileSystem struct {
Base string
}
FileSystem file system storage
func (FileSystem) Delete ¶
func (fileSystem FileSystem) Delete(path string) error
Delete delete file
func (FileSystem) Get ¶
func (fileSystem FileSystem) Get(path string) (*os.File, error)
Get receive file with given path
func (FileSystem) GetFullPath ¶
func (fileSystem FileSystem) GetFullPath(path string) string
GetFullPath get full path from absolute/relative path
func (FileSystem) GetStream ¶
func (fileSystem FileSystem) GetStream(path string)
GetStream get file as stream
Click to show internal directories.
Click to hide internal directories.