file

package
v0.0.0-...-08e63c9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(file string, content string)

Append appends content to a file

func Checksum

func Checksum(file string) string

Checksum returns the checksum of a file applying md5 if file could not be read, returns empty string

func Copy

func Copy(src, dst string) (int64, error)

Copy copies a file from source to destination

func Exists

func Exists(file string) bool

func First

func First(pattern string) string

First returns the first file that achieves the given pattern

func IsEmpty

func IsEmpty(file string) bool

IsEmpty returns if file is empty

func List

func List(pattern string) []string

List lists all files that achieve the given pattern

func MergeFiles

func MergeFiles(outputPath string, inputPaths []string)

MergeFiles merges all files into a single one

func Move

func Move(src, dst string) error

Move moves a file from source to destination

func Read

func Read(file string) string

Read reads a file and returns its contents

func Remove

func Remove(file string) error

Remove removes a file

func RemoveAll

func RemoveAll(dir string, pattern string)

RemoveAll removes all files that accomplish the given pattern

func Size

func Size(file string) int64

Size returns the file size

func Write

func Write(file string, content string)

Write writes a file with the given content

Types

This section is empty.

Jump to

Keyboard shortcuts

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