mavtables  0.2.1
MAVLink router and firewall.
Filesystem.hpp
Go to the documentation of this file.
1 // MAVLink router and firewall.
2 // Copyright (C) 2018 Michael R. Shannon <mrshannon.aerospace@gmail.com>
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 
18 #ifndef FILESYSTEM_HPP_
19 #define FILESYSTEM_HPP_
20 
21 
22 #include <memory>
23 #include <optional>
24 #include <string>
25 
26 #include <boost/filesystem.hpp>
27 
28 #include "config.hpp"
29 
30 
31 /** A class containing filesystem operations.
32  *
33  * \note This class exists for testing purposes and to provide a level of
34  * indirection so the underlying filesystem library can be changed to
35  * std::filesystem once it is moved out of experimental.
36  */
38 {
39  public:
40  using path = boost::filesystem::path;
41  TEST_VIRTUAL ~Filesystem();
42  TEST_VIRTUAL bool exists(const path &p) const;
43 };
44 
45 
46 #endif // FILESYSTEM_HPP_
TEST_VIRTUAL ~Filesystem()
Definition: Filesystem.cpp:26
TEST_VIRTUAL bool exists(const path &p) const
Definition: Filesystem.cpp:36
boost::filesystem::path path
Definition: Filesystem.hpp:40