MiKTeX 26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
TemporaryDirectory.h
1/* miktex/Core/TemporaryDirectory.h: -*- C++ -*-
2
3 Copyright (C) 2016-2021 Christian Schenk
4
5 This file is part of the MiKTeX Core Library.
6
7 The MiKTeX Core Library is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2, or
10 (at your option) any later version.
11
12 The MiKTeX Core Library is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with the MiKTeX Core Library; if not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22#pragma once
23
24#if !defined(C0D7704DBE834212B4AE53EC5EBC7E3C)
25#define C0D7704DBE834212B4AE53EC5EBC7E3C
26
27#include <miktex/Core/config.h>
28
29#include <memory>
30
31#include <miktex/Util/PathName>
32
33MIKTEX_CORE_BEGIN_NAMESPACE;
34
35class MIKTEXNOVTABLE TemporaryDirectory
36{
37public:
38 virtual MIKTEXTHISCALL ~TemporaryDirectory() noexcept = 0;
39
40public:
41 virtual void MIKTEXTHISCALL Delete() = 0;
42
43public:
44 virtual MiKTeX::Util::PathName MIKTEXTHISCALL GetPathName() = 0;
45
46public:
47 virtual void MIKTEXTHISCALL Keep() = 0;
48
49public:
50 virtual void MIKTEXTHISCALL SetCurrent() = 0;
51
52public:
53 static MIKTEXCORECEEAPI(std::unique_ptr<TemporaryDirectory>) Create();
54
55public:
56 static MIKTEXCORECEEAPI(std::unique_ptr<TemporaryDirectory>) Create(const MiKTeX::Util::PathName& path);
57};
58
59MIKTEX_CORE_END_NAMESPACE;
60
61#endif
Definition TemporaryDirectory.h:36
Instances of this class can be used to store path names.
Definition PathName.h:64