1*15d4d21cSHao Zhou // Copyright 2023 Google LLC 2*15d4d21cSHao Zhou // 3*15d4d21cSHao Zhou // Licensed under the Apache License, Version 2.0 (the "License"); 4*15d4d21cSHao Zhou // you may not use this file except in compliance with the License. 5*15d4d21cSHao Zhou // You may obtain a copy of the License at 6*15d4d21cSHao Zhou // 7*15d4d21cSHao Zhou // http://www.apache.org/licenses/LICENSE-2.0 8*15d4d21cSHao Zhou // 9*15d4d21cSHao Zhou // Unless required by applicable law or agreed to in writing, software 10*15d4d21cSHao Zhou // distributed under the License is distributed on an "AS IS" BASIS, 11*15d4d21cSHao Zhou // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*15d4d21cSHao Zhou // See the License for the specific language governing permissions and 13*15d4d21cSHao Zhou // limitations under the License. 14*15d4d21cSHao Zhou 15*15d4d21cSHao Zhou #pragma once 16*15d4d21cSHao Zhou 17*15d4d21cSHao Zhou #include "file_system_wrapper.hpp" 18*15d4d21cSHao Zhou 19*15d4d21cSHao Zhou namespace google 20*15d4d21cSHao Zhou { 21*15d4d21cSHao Zhou namespace ipmi 22*15d4d21cSHao Zhou { 23*15d4d21cSHao Zhou namespace fs = std::filesystem; 24*15d4d21cSHao Zhou 25*15d4d21cSHao Zhou class FileSystemWrapper : public FileSystemInterface 26*15d4d21cSHao Zhou { 27*15d4d21cSHao Zhou public: 28*15d4d21cSHao Zhou bool exists(const fs::path& path, std::error_code& ec) const; 29*15d4d21cSHao Zhou void rename(const fs::path& oldPath, const fs::path& newPath, 30*15d4d21cSHao Zhou std::error_code& ec) const; 31*15d4d21cSHao Zhou void create(const char* path) const; 32*15d4d21cSHao Zhou }; 33*15d4d21cSHao Zhou 34*15d4d21cSHao Zhou } // namespace ipmi 35*15d4d21cSHao Zhou } // namespace google 36