files

package
v0.0.0-...-b0fb426 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Files

type Files struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(outputDirectory string, logger *log.Logger, opts *Options) (*Files, errors.E)

func (*Files) Mkdirp

func (f *Files) Mkdirp(dir string) errors.E

func (*Files) NewFileFromPost

func (f *Files) NewFileFromPost(post *content.Post) *storage.File

func (*Files) OpenFileAndVariants

func (f *Files) OpenFileAndVariants(filename string) (multifile.FileLike, errors.E)

func (*Files) OpenRead

func (f *Files) OpenRead(filename string) (io.ReadCloser, errors.E)

func (*Files) OpenWrite

func (f *Files) OpenWrite(filename string) (io.WriteCloser, errors.E)

func (*Files) Write

func (f *Files) Write(pathname string, _ string, content *buffer.Buffer) errors.E

func (*Files) WriteFile

func (f *Files) WriteFile(file *storage.File, content *buffer.Buffer) errors.E

func (*Files) WritePost

func (f *Files) WritePost(post *content.Post, content *buffer.Buffer) errors.E

type Options

type Options struct {
	Compress bool
}

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(path string, log *log.Logger) (*Reader, errors.E)

func (*Reader) CanonicalisePath

func (r *Reader) CanonicalisePath(path string) (cPath string, differs bool)

func (*Reader) GetFile

func (r *Reader) GetFile(urlPath string) (*storage.File, errors.E)

func (*Reader) OpenFile

func (r *Reader) OpenFile(path string, filename string) (*storage.File, errors.E)

Jump to

Keyboard shortcuts

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