Marco Poletti | 6669c69 | 2022-04-07 14:42:56 -0700 | [diff] [blame] | 1 | // Part of the Crubit project, under the Apache License v2.0 with LLVM |
| 2 | // Exceptions. See /LICENSE for license information. |
| 3 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 4 | |
| 5 | #ifndef CRUBIT_COMMON_FILE_IO_H_ |
| 6 | #define CRUBIT_COMMON_FILE_IO_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
Lukasz Anforowicz | cec7a8a | 2022-04-27 10:24:51 -0700 | [diff] [blame] | 10 | #include "absl/status/statusor.h" |
Marco Poletti | 6669c69 | 2022-04-07 14:42:56 -0700 | [diff] [blame] | 11 | |
| 12 | namespace crubit { |
| 13 | |
Marco Poletti | b5239c9 | 2022-05-11 09:46:05 -0700 | [diff] [blame] | 14 | absl::StatusOr<std::string> GetFileContents(absl::string_view path); |
| 15 | |
Marco Poletti | 6669c69 | 2022-04-07 14:42:56 -0700 | [diff] [blame] | 16 | absl::Status SetFileContents(absl::string_view path, |
| 17 | absl::string_view contents); |
| 18 | |
| 19 | } // namespace crubit |
| 20 | |
| 21 | #endif // CRUBIT_COMMON_FILE_IO_H_ |