fileutil

package
v0.16.0-rc6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyEmbedDir added in v0.16.0

func CopyEmbedDir(fs embed.FS, src string, dst string) error

CopyEmbedDir copies an embedded directory to the local file system.

func CopyToTempFile

func CopyToTempFile(r io.Reader, name string, ext string) (string, error)

CopyToTempFile pipes a reader to a temporary file. The caller must delete the temporary file when it's no longer needed.

func FullExt

func FullExt(path string) string

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 Stem added in v0.16.0

func Stem(path string) string

Stem returns the file name after removing directory and all extensions. Uses FullExt to strip extensions.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL