import "github.com/apache/beam/sdks/go/pkg/beam/io/filesystem"
Package filesystem contains an extensible file system abstraction. It allows various kinds of storage systems to be used uniformly, notably through textio.
Read fully reads the given file from the file system.
Register registers a file system backend under the given scheme. For example, "hdfs" would be registered a HFDS file system and HDFS paths used transparently.
ValidateScheme panics if the given path's scheme does not have a corresponding file system registered.
Write writes the given content to the file system.
type Interface interface { io.Closer // List expands a patten to a list of filenames. List(ctx context.Context, glob string) ([]string, error) // OpenRead opens a file for reading. OpenRead(ctx context.Context, filename string) (io.ReadCloser, error) // OpenRead opens a file for writing. If the file already exist, it will be // overwritten. OpenWrite(ctx context.Context, filename string) (io.WriteCloser, error) // Size returns the size of a file in bytes. Size(ctx context.Context, filename string) (int64, error) }
Interface is a filesystem abstraction that allows beam io sources and sinks to use various underlying storage systems transparently.
New returns a new Interface for the given file path's scheme.
Path | Synopsis |
---|---|
gcs | Package gcs contains a Google Cloud Storage (GCS) implementation of the Beam file system. |
local | Package local contains a local file implementation of the Beam file system. |
memfs | Package memfs contains a in-memory Beam filesystem. |
Package filesystem imports 6 packages (graph) and is imported by 8 packages. Updated 2020-10-26. Refresh now. Tools for package owners.