summaryrefslogtreecommitdiff
path: root/libcutl/cutl/fs/auto-remove.hxx
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-03-06 10:24:11 +0100
committerJörg Frings-Fürst <debian@jff.email>2024-03-06 10:24:11 +0100
commit4538829ab86b5a1cd4e845e7eab165029c9d6d46 (patch)
treebbadf39aed0610c8f8f7b41fefff47773b8ac205 /libcutl/cutl/fs/auto-remove.hxx
parent23d41842168ac1a1580111b9c5c73500ceee3d57 (diff)
parentaad5ad9bf0c02aa4e79bc6b7d6c934612fff4026 (diff)
Update upstream source from tag 'upstream/4.2.0'
Update to upstream version '4.2.0' with Debian dir 1b38df7bbcf313223de3c50107ac0255090fe647
Diffstat (limited to 'libcutl/cutl/fs/auto-remove.hxx')
-rw-r--r--libcutl/cutl/fs/auto-remove.hxx83
1 files changed, 0 insertions, 83 deletions
diff --git a/libcutl/cutl/fs/auto-remove.hxx b/libcutl/cutl/fs/auto-remove.hxx
deleted file mode 100644
index c0319e8..0000000
--- a/libcutl/cutl/fs/auto-remove.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-// file : cutl/fs/auto-remove.hxx
-// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
-// license : MIT; see accompanying LICENSE file
-
-#ifndef CUTL_FS_AUTO_REMOVE_HXX
-#define CUTL_FS_AUTO_REMOVE_HXX
-
-#include <vector>
-
-#include <cutl/fs/path.hxx>
-#include <cutl/fs/exception.hxx>
-
-#include <cutl/details/export.hxx>
-
-namespace cutl
-{
- namespace fs
- {
- // Remove a file or an empty directory on destruction unless canceled.
- //
- struct LIBCUTL_EXPORT auto_remove
- {
- explicit
- auto_remove (path const& p)
- : path_ (p), canceled_ (false)
- {
- }
-
- ~auto_remove ();
-
- void
- cancel ()
- {
- canceled_ = true;
- }
-
- private:
- auto_remove (auto_remove const&);
-
- auto_remove&
- operator= (auto_remove const&);
-
- private:
- path path_;
- bool canceled_;
- };
-
- // Remove a list of file or aempty directories on destruction unless
- // canceled.
- //
- struct LIBCUTL_EXPORT auto_removes
- {
- auto_removes (): canceled_ (false) {}
- ~auto_removes ();
-
- void
- add (path const& p)
- {
- paths_.push_back (p);
- }
-
- void
- cancel ()
- {
- canceled_ = true;
- }
-
- private:
- auto_removes (auto_removes const&);
-
- auto_removes&
- operator= (auto_removes const&);
-
- private:
- typedef std::vector<path> paths;
-
- paths paths_;
- bool canceled_;
- };
- }
-}
-
-#endif // CUTL_FS_AUTO_REMOVE_HXX