xref: /aosp_15_r20/external/skia/bazel/exporter/interfaces/file_system.go (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1// Copyright 2022 Google LLC
2//
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5package interfaces
6
7// FileSystem defines an interface for interacting with the underlying OS
8// filesystem.
9type FileSystem interface {
10	// OpenFile defines a function responsible for opening a file with
11	// write access identified by the absolute path.
12	OpenFile(path string) (Writer, error)
13
14	// ReadFile defines a function responsible for reading the entire
15	// contents of a file from disk.
16	ReadFile(filename string) ([]byte, error)
17}
18