Skip to content

Releases: bugdea1er/tmp

v4

02 Sep 17:42

Choose a tag to compare

Breaking changes

  • Removed file::move and directory::move methods (#208)
  • Removed file::copy and directory::copy methods (#214)
  • Removed openmode parameter from file construction (#218)
  • Removed std::hash specializations (#219)

What's Changed

  • Converted file into a template class tmp::basic_file (#158)

Full Changelog: v3.0.1...v4

v3.0.1

01 May 17:07

Choose a tag to compare

What's Changed

  • Optimized file::copy (#206)
  • Fixed a TOC/TOU bug in directory::copy (#202)
  • Fixed a bug where file::copy could attempt to create a copy from a non-regular file (#205)

Full Changelog: v3...v3.0.1

v3

16 Mar 22:08

Choose a tag to compare

v3

Breaking changes

  • Removed file::path() method (#176). As discussed in #165, here and here, using a temporary file path instead of its handle can lead to security vulnerabilities
  • Removed tmp::filebuf (#178)

Other changes

  • Replaced directory labels with prefixes (#171)
  • Added file::native_handle for C++17 mode (#172)

Full changelog: v2.1...v3

v2.1

13 Feb 20:27

Choose a tag to compare

What's Changed

  • Add file::native_handle for C++26 (#162)
  • Fix a TOC/TOU vunerability where a filebuf could be open after a temporary file was deleted (#164)
  • Add meson build system support (#159)
  • Always open file with std::ios::in and std::ios::out flags (#167)
  • Fixed a bug where invalid open mode was not handled correctly (#168)
  • Make file(file&&) noexcept (db6886e)

Full Changelog: v2...v2.1

v2

29 Jan 11:33

Choose a tag to compare

v2

Breaking changes

  • file now extends std::iostream (#150). std::fstream is C++ opened file abstraction, file now just simulates it for reading/writing operations instead of providing its own.
  • directory::list method has been removed (#149). directory::list did not add anything new compared to the standard std::filesystem::directory_iterator and was therefore useless.
  • Temporary directories are no longer opened when created (#148). In practice, opening temporary directories does not help at all, since there is little you can do with its native handle, and even traversing the directory using the native OS API reopens the directory.
  • entry no longer provides a definition for or manages its native handle (#148). This is because defining and managing native_handle in entry limits the variety of types of handles: for example, file could use corecrt on Windows and manage int instead of HANDLE
  • The target parent is no longer created when moving a temporary entry (#151). This just mimics behavior of standard std::filesystem functions more closely and won't confuse the user
  • Move move from entry (#152). file and directory still provide this method, but any otherentry subclass should implement it if needed

Full Changelog: v1.3...v2

v1.2.1

03 Jan 23:31

Choose a tag to compare

  • Fixed a bug when errors in file::read, file::write and file::append were not reported (#137)
  • Fixed a bug when a text was written to a file in binary format on Windows (#138)

Full Changelog: v1.2...v1.2.1

v1.2

13 Oct 20:18

Choose a tag to compare

  • Added a more convenient entry(std::pair<std::filesystem::path, native_handle>) constructor (#126)
  • Fixed a bug when moving an entry to itself caused a deletion of said entry (#129)
  • Fixed a bug when moving a directory to an existing file between filesystems would not throw an exception (#129)
  • Fixed a bug when move was constrained to regular files and directories only (#129)
  • Fixed a bug when an entry could be deleted even if it was not moved due to an error (#129)

Full Changelog: v1.1.1...v1.2

v1.1.1

29 Sep 16:03

Choose a tag to compare

  • Fixed a bug when a "moved from"entry could still close a file when destructed (#119)

Full Changelog: v1.1...v1.1.1

v1.1

21 Sep 22:38

Choose a tag to compare

  • Implemented std::hash and relational operators for tmp:: classes (#111)
  • Added file::input_stream and file::output_stream methods (#112)
  • Temporary directories are now opened when created (#114)
  • Added deb and rpm generators support (#35 and #117)

Full Changelog: v1.0...v1.1

v1.0

10 Aug 22:59

Choose a tag to compare

Breaking changes

  • Rename tmp::path to tmp::entry(#82)
  • Remove deprecated operator-> (#83)
  • Make entry::release private (#92)
  • Validate labels and extensions for temporary entries (#103)

What's Changed

  • Remove temporary prefix if it is empty (#80)
  • Remove C++ modules support (for now) (#89)
  • Add directory::list method (#94)
  • Fix Windows detection for Clang (#100)
  • Make this shared library (#101)

Full Changelog: v0.9...v1.0