fileutil

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxFileSize is the default maximum allowed file size (100MB)
	MaxFileSize = 100 * 1024 * 1024
)

Variables

This section is empty.

Functions

func CheckFileSize

func CheckFileSize(path string) error

CheckFileSize verifies if a file is within acceptable size limits

func SafeOpenFile

func SafeOpenFile(path string) (*os.File, error)

SafeOpenFile opens a file after checking its size

func SafeReadFile

func SafeReadFile(path string) ([]byte, error)

SafeReadFile reads a file after checking its size

Types

This section is empty.

Jump to

Keyboard shortcuts

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