Documentation
¶
Overview ¶
Package export handles file export operations such as creating zip archives of email attachments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytesLong ¶
FormatBytesLong formats bytes with full precision for export results.
func FormatExportResult ¶ added in v0.4.0
func FormatExportResult(stats ExportStats) string
FormatExportResult formats ExportStats into a human-readable string for display.
func SanitizeFilename ¶
SanitizeFilename removes or replaces characters that are invalid in filenames.
Types ¶
type ExportStats ¶ added in v0.4.0
type ExportStats struct {
Count int
Size int64
Errors []string
ZipPath string
WriteError bool // true if a write error occurred and the zip was removed
}
ExportStats contains structured results of an attachment export operation.
func Attachments ¶
func Attachments(zipFilename, attachmentsDir string, attachments []query.AttachmentInfo) ExportStats
Attachments exports the given attachments into a zip file. It reads attachment content from attachmentsDir using content-hash based paths.
Click to show internal directories.
Click to hide internal directories.