Documentation ¶
Overview ¶
Package file provides file I/O functionality
Index ¶
- func AppendFile(ctx context.Context, target string, r io.Reader, perm fs.FileMode) (n int64, err error)
- func CopyDir(ctx context.Context, src, dst string) (err error)
- func CopyFile(ctx context.Context, src, dst string) (n int64, err error)
- func CopyFileWithPerm(ctx context.Context, src, dst string, perm fs.FileMode) (n int64, err error)
- func CreateTemp(baseDir string) (f *os.File, err error)
- func Exists(path string) (e bool)
- func ExistsWithDetail(path string) (e bool, fi fs.FileInfo, err error)
- func Join(paths ...string) (path string)
- func ListInDir(path string) ([]string, error)
- func MkdirAll(path string, perm fs.FileMode) (err error)
- func MkdirTemp(baseDir string) (path string, err error)
- func MoveDir(ctx context.Context, src, dst string) (err error)
- func Open(path string, flg int, perm fs.FileMode) (file *os.File, err error)
- func OverWriteFile(ctx context.Context, target string, r io.Reader, perm fs.FileMode) (n int64, err error)
- func ReadDir(path string) (dirs []fs.DirEntry, err error)
- func ReadFile(path string) (n []byte, err error)
- func WriteFile(ctx context.Context, target string, r io.Reader, perm fs.FileMode) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶ added in v1.5.0
func CopyFileWithPerm ¶ added in v1.5.0
func CreateTemp ¶ added in v1.5.1
CreateTemp create temporary file from given base path if base path is nil temporary directory will create from Go's standard library
func ExistsWithDetail ¶ added in v1.2.1
ExistsWithDetail returns file existence
func MkdirTemp ¶ added in v1.5.0
MkdirTemp create temporary directory from given base path if base path is nil temporary directory will create from Go's standard library
func Open ¶
Open opens the file with the given path, flag and permission. If the folder does not exists, create the folder. If the file does not exist, create the file.
func OverWriteFile ¶ added in v1.5.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.