Documentation
¶
Overview ¶
Package file contains utilities for operating on files.
Index ¶
- func Append(name string, content []byte) error
- func Copy(oldpath, newpath string) error
- func Create(name string, perm os.FileMode) error
- func DownloadWithCache(ctx context.Context, cacheDir, src, dest string, mode fs.FileMode, quiet bool) error
- func DownloadWithCacheAndExtract(ctx context.Context, cacheDir, src, dest string, match string, ...) error
- func Exists(name string) bool
- func Open(name string, perm os.FileMode) (*os.File, error)
- func Remove(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadWithCache ¶
func DownloadWithCache(ctx context.Context, cacheDir, src, dest string, mode fs.FileMode, quiet bool) error
DownloadWithCache downloads the src file to the dest file.
func DownloadWithCacheAndExtract ¶
func DownloadWithCacheAndExtract(ctx context.Context, cacheDir, src, dest string, match string, mode fs.FileMode, quiet bool, clean bool) error
DownloadWithCacheAndExtract downloads the src file to the dest file, and extract it to the dest directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.