filestore

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package filestore provides on-disk storage for resource file fields.

File field support is an experimental, non-AEP-spec extension of aepbase. Files are stored under a root directory (typically {DataDir}/files) in a layout that mirrors the resource path:

{root}/{resource_path}/{field_name}

e.g. data/files/publishers/pub1/books/book1/cover

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAll

func DeleteAll(root, resourcePath string) error

DeleteAll removes every stored file for a resource. Best-effort: returns the first error encountered but does not stop on missing files.

func Exists

func Exists(root, resourcePath, field string) bool

Exists reports whether a file field exists on disk.

func Path

func Path(root, resourcePath, field string) (string, error)

Path returns the on-disk path where a resource's file field is stored. It does not check whether the file exists.

func Write

func Write(root, resourcePath, field string, r io.Reader) (int64, error)

Write streams the contents of r into the field's file, creating parent directories as needed. Any existing file is overwritten.

Types

This section is empty.

Jump to

Keyboard shortcuts

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