Documentation
¶
Index ¶
- func Decode(content []byte) []byte
- func DecodeString(content string) string
- func Encode(content []byte) string
- type File
- type Fs
- type Xfs
- func (xfs *Xfs) GetTempDir(subPath string) string
- func (xfs *Xfs) MustDirExists(dirname string) bool
- func (xfs *Xfs) MustExists(filename string) bool
- func (xfs *Xfs) MustFileContainsBytes(filename string, subslice []byte) bool
- func (xfs *Xfs) MustIsDir(dirname string) bool
- func (xfs *Xfs) MustIsEmpty(filename string) bool
- func (xfs *Xfs) MustMkdir(dirname string, pterm fs.FileMode)
- func (xfs *Xfs) MustMkdirAll(dirname string, pterm fs.FileMode)
- func (xfs *Xfs) MustOpen(filename string) File
- func (xfs *Xfs) MustReadDir(dirname string) []os.FileInfo
- func (xfs *Xfs) MustReadFile(filename string) []byte
- func (xfs *Xfs) MustSafeWriteReader(filename string, r io.Reader)
- func (xfs *Xfs) MustTempDir(dirname string, prefix string) string
- func (xfs *Xfs) MustTempFile(dirname, prefix string) File
- func (xfs *Xfs) MustWalk(root string, walkFn filepath.WalkFunc)
- func (xfs *Xfs) MustWriteFile(filename string, data []byte, perm os.FileMode)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Xfs ¶
Xfs 文件系统
var Stor Xfs
Stor 文件系统实例
func (*Xfs) MustDirExists ¶
MustDirExists 检查文件夹是否存在
func (*Xfs) MustFileContainsBytes ¶
MustFileContainsBytes 文件是否包含内容
func (*Xfs) MustMkdirAll ¶
MustMkdirAll 创建文件夹及子文件夹
func (*Xfs) MustReadDir ¶
MustReadDir 阅读文件夹内容
func (*Xfs) MustSafeWriteReader ¶
MustSafeWriteReader 检查文件能否写入
func (*Xfs) MustTempDir ¶
MustTempDir 创建临时文件夹
func (*Xfs) MustTempFile ¶
MustTempFile 临时文件
Click to show internal directories.
Click to hide internal directories.