files

package
v0.0.0-...-e69eef7 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 35

Documentation

Overview

Package files supports reading and writing files from local directories or GCS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(ctx context.Context, path string) ([]byte, error)

Read reads the file specified by the path.

Types

type File

type File interface {
	Read(ctx context.Context) ([]byte, error)
	Name() string
	FullPath() string
}

File represents a file, either local or remote.

func List

func List(ctx context.Context, path string) ([]File, error)

List lists files in the directory specified by the path.

Jump to

Keyboard shortcuts

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