blob: b2924d66cf3f68909968db96f49c6a112d05f86a [file] [log] [blame]
Marco Poletti6669c692022-04-07 14:42:56 -07001// 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 Anforowiczcec7a8a2022-04-27 10:24:51 -070010#include "absl/status/statusor.h"
Marco Poletti6669c692022-04-07 14:42:56 -070011
12namespace crubit {
13
Marco Polettib5239c92022-05-11 09:46:05 -070014absl::StatusOr<std::string> GetFileContents(absl::string_view path);
15
Marco Poletti6669c692022-04-07 14:42:56 -070016absl::Status SetFileContents(absl::string_view path,
17 absl::string_view contents);
18
19} // namespace crubit
20
21#endif // CRUBIT_COMMON_FILE_IO_H_