Skip to content

Commit

Permalink
Add documentation for the new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdea1er committed Mar 12, 2024
1 parent 977d0c1 commit 1375095
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/tmp/directory
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public:
/// @throws std::filesystem::filesystem_error if cannot create a directory
explicit directory(std::string_view prefix = "");

/// Creates a unique temporary copy recursively from the given path
///
/// @param path A path to make a temporary copy from
/// @param prefix A prefix to be used in the temporary directory path
/// @return The new temporary directory
/// @throws std::filesystem::filesystem_error if the given path is not a directory
static directory copy(const std::filesystem::path& path, std::string_view prefix = "");

/// Concatenates this directory path with a given @p source
Expand Down
6 changes: 6 additions & 0 deletions include/tmp/file
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ public:
/// @throws std::filesystem::filesystem_error if cannot create a file
static file text(std::string_view prefix = "");

/// Creates a unique temporary copy from the given path
///
/// @param path A path to make a temporary copy from
/// @param prefix A prefix to be used in the temporary directory path
/// @return The new temporary file
/// @throws std::filesystem::filesystem_error if the given path is not a regular file
static file copy(const std::filesystem::path& path, std::string_view prefix = "");

/// Streams the contents of this file
Expand Down

0 comments on commit 1375095

Please sign in to comment.