files

package
v0.0.0-...-24bcc79 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTotalSize

func GetTotalSize(fileInfos []FileInfo) int64

GetTotalSize returns the total size of all files

Types

type FileInfo

type FileInfo struct {
	// Path is the absolute path to the file
	Path string

	// Name is the filename (without directory)
	Name string

	// Size is the file size in bytes
	Size int64

	// Type is the MIME type of the file (e.g., "application/pdf", "text/plain")
	Type string

	// IsReadable indicates if the file can be read
	IsReadable bool
}

FileInfo holds information about a file to be sent

func ValidateFiles

func ValidateFiles(filePaths []string) ([]FileInfo, error)

ValidateFiles checks if all files exist and are readable Returns a list of FileInfo for valid files and an error if any file is invalid

Jump to

Keyboard shortcuts

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