file

package
v0.0.0-...-ac9d2ad Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathIsDir  = errors.New("supplied path is a directory")
	ErrPathIsFile = errors.New("supplied path is a file")
)

Functions

func CreateArchive

func CreateArchive(archivePath string, filesToAdd []string, basePath string) error

func CreateFileP

func CreateFileP(filePath string, perm fs.FileMode) (*os.File, error)

CreateFileP Creates a file and all its directories Make sure you close the file when using this function!

func Exists

func Exists(path string) error

func GetFileSize

func GetFileSize(filePath string) (int, error)

func GetRelPathFromAbs

func GetRelPathFromAbs(absPath string, base string) (string, error)

GetRelPathFromAbs Get the relative path from an absolute path with a specified base dir

func Info

func Info(path string) (fs.FileInfo, error)

func IsDir

func IsDir(path string) error

func MoveFile

func MoveFile(sourcePath string, destPath string) error

func WriteTo

func WriteTo(filePath string, text string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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