blob: 09885ec875615aa8523552ef30e41b40f97037a4 [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
Dmitri Gribenkoecf5db32023-07-10 08:56:17 -070010#include "absl/status/status.h"
Lukasz Anforowiczcec7a8a2022-04-27 10:24:51 -070011#include "absl/status/statusor.h"
Dmitri Gribenkoecf5db32023-07-10 08:56:17 -070012#include "absl/strings/string_view.h"
Marco Poletti6669c692022-04-07 14:42:56 -070013
14namespace crubit {
15
Marco Polettib5239c92022-05-11 09:46:05 -070016absl::StatusOr<std::string> GetFileContents(absl::string_view path);
17
Marco Poletti6669c692022-04-07 14:42:56 -070018absl::Status SetFileContents(absl::string_view path,
19 absl::string_view contents);
20
21} // namespace crubit
22
23#endif // CRUBIT_COMMON_FILE_IO_H_