files

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCreator

type FileCreator interface {
	CreateFolder(path string) (fullpath string, err error)
	CreateFile(byteArray []byte, path string, name string, fileType string) (cleanName string, err error)
}

FileCreator is an interface to encapsulate the file creation process. Is has 2 implementations in memory and one that uses files on disk.

func NewDiskFileCreator

func NewDiskFileCreator() FileCreator

NewDiskFileCreator creates a new FileCreator instance

func NewInMemoryFileCreator

func NewInMemoryFileCreator() FileCreator

NewInMemoryFileCreator creates a new instance of FileCreator

Jump to

Keyboard shortcuts

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