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