22#include <gmock/gmock.h>
23#include <gtest/gtest.h>
25#include "iceberg/file_io.h"
34 MOCK_METHOD((Result<std::string>),
ReadFile,
35 (
const std::string&, std::optional<size_t>), (
override));
37 MOCK_METHOD(Status,
WriteFile, (
const std::string&, std::string_view), (
override));
39 MOCK_METHOD(Status,
DeleteFile, (
const std::string&), (
override));
Pluggable module for reading, writing, and deleting files.
Definition file_io.h:115
virtual Result< std::string > ReadFile(const std::string &file_location, std::optional< size_t > length)
Read the content of the file at the given location.
Definition file_io.cc:58
virtual Status WriteFile(const std::string &file_location, std::string_view content)
Write the given content to the file at the given location.
Definition file_io.cc:89
virtual Status DeleteFile(const std::string &file_location)
Delete a file at the given location.
Definition file_io.h:154