Skip to content

Commit

Permalink
Move tmp::fs definition to a separate file (#24)
Browse files Browse the repository at this point in the history
- Move tmp::fs definition to a separate file
- Remove <filesystem> include
  • Loading branch information
bugdea1er authored Mar 13, 2024
1 parent 115a094 commit 3b381c8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/tmp/directory
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <tmp/fs>
#include <tmp/path>

#include <filesystem>
#include <string_view>

namespace tmp {
Expand Down
2 changes: 1 addition & 1 deletion include/tmp/file
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <tmp/fs>
#include <tmp/path>

#include <filesystem>
#include <fstream>
#include <string>
#include <string_view>
Expand Down
9 changes: 9 additions & 0 deletions include/tmp/fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

#include <filesystem>

namespace tmp {

/// The filesystem library to use
namespace fs = std::filesystem;
} // namespace tmp
5 changes: 2 additions & 3 deletions include/tmp/path
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#pragma once

#include <tmp/fs>

#include <filesystem>
#include <string_view>

namespace tmp {

/// The filesystem library to use
namespace fs = std::filesystem;

/// tmp::path is a smart handle that owns and manages a temporary path and
/// deletes it recursively when this handle goes out of scope
///
Expand Down
3 changes: 1 addition & 2 deletions src/tmp.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include <tmp/fs>
#include <tmp/path>

#include <tmp/file>
#include <tmp/directory>

#include <filesystem>
#include <fstream>
#include <string_view>
#include <system_error>
Expand Down

0 comments on commit 3b381c8

Please sign in to comment.