file

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(destFileName string, srcFileSys fs.FS, srcFileName string) (err error)

Copy copies a file or a directory from a source FS to disk. In case of a directory, all nested subdirectories are recursively copied as well. If a file already exists at the destination, it is overwritten.

If a source file name ends with an underscore, one underscore is trimmed before copying. The corresponding destination file name will not include that underscore.

func Exists

func Exists(fileName string) (exists bool, err error)

Exists indicates if the named file or directory exists on disk. The file name is resolved relative to the current OS working directory.

func Mkdir

func Mkdir(dirPath string) (created bool, err error)

Mkdir creates a directory, if it doesn't exist. The directory path is resolved relative to the current OS working directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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