nativefiles

package
v0.412.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

README

natfivefiles package

Handle local files and directories in a go native way.

For developers

To run tests use:

bash -c "cd $(git rev-parse --show-toplevel) && go test -v ./pkg/filesutils/nativefiles/..."

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, path string) error

func Delete

func Delete(ctx context.Context, pathToDelete string) error

func Exists

func Exists(ctx context.Context, pathToCheck string) bool

func IsDir

func IsDir(ctx context.Context, pathToCheck string) bool

func IsFile

func IsFile(ctx context.Context, pathToCheck string) bool

func ReadAsBytes added in v0.408.0

func ReadAsBytes(ctx context.Context, pathToRead string) ([]byte, error)

func ReadAsString

func ReadAsString(ctx context.Context, pathToRead string) (string, error)

func SecureDelete

func SecureDelete(ctx context.Context, path string) error

Overwrite the file before deleting it to prevent data restore. Like 'shred' on linux systems.

func WriteBytes added in v0.408.0

func WriteBytes(ctx context.Context, pathToWrite string, content []byte) error

func WriteString

func WriteString(ctx context.Context, pathToWrite string, content 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