file

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy added in v0.1.6

func Copy(src, dst string) error

Copy files Copy copies a regular file from src to dst. If dst exists, returns error. Uses io.Copy for efficient file transfer.

func IsDir

func IsDir(dir string) (bool, error)

IsDir returns (true, nil) if the given path is a directory. Returns (false, nil) if it's a file. Returns (false, error) if the path does not exist or other error occurs.

func IsFile

func IsFile(filePath string) (bool, error)

IsFile returns (true, nil) if given path is a file. Returns (false, nil) if it's a directory. Returns (false, error) if the path does not exist or other error occurs.

func Remove added in v0.0.2

func Remove(filePath string) error

Remove removes the file or directory at the given path, including any children if it's a directory. If the path does not exist, Remove returns nil (no error). If there is an error, it will be of type *PathError.

Types

This section is empty.

Jump to

Keyboard shortcuts

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