Documentation ¶
Index ¶
- func CopyEmbedDir(fs embed.FS, src, dst string) error
- func CopyToTempFile(r io.Reader, name, ext string) (string, error)
- func ExpandHome(path string) (string, error)
- func ForceRemoveFiles(paths []string)
- func FullExt(path string) string
- func IsGlob(path string) bool
- func OpenTempFileInDir(dir, filePath string) (*os.File, error)
- func Stem(path string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyEmbedDir ¶ added in v0.16.0
CopyEmbedDir copies an embedded directory to the local file system.
func CopyToTempFile ¶
CopyToTempFile pipes a reader to a temporary file. The caller must delete the temporary file when it's no longer needed.
func ExpandHome ¶ added in v0.19.0
func ForceRemoveFiles ¶ added in v0.19.0
func ForceRemoveFiles(paths []string)
ForceRemoveFiles deletes multiple files ignores path errors if any
func FullExt ¶
FullExt returns all of path's extensions. For example, for "foo.csv.zip" it returns ".csv.zip", not just ".zip" as filepath.Ext from the standard library does.
func IsGlob ¶ added in v0.19.0
IsGlob reports whether path contains any of the magic characters recognized by path.Match.
func OpenTempFileInDir ¶ added in v0.21.0
OpenTempFileInDir opens a temp file in given dir If dir doesn't exist it creates full dir path (recursively if required)
Types ¶
This section is empty.