Loading...
Searching...
No Matches
juce_TemporaryFile.h
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
class JUCE_API TemporaryFile
{
public:
//==============================================================================
enum OptionFlags
{
useHiddenFile = 1,
putNumbersInBrackets = 2
};
//==============================================================================
TemporaryFile (const String& suffix = String(),
int optionFlags = 0);
TemporaryFile (const File& targetFile,
int optionFlags = 0);
TemporaryFile (const File& targetFile,
const File& temporaryFile);
~TemporaryFile();
//==============================================================================
const File& getFile() const noexcept { return temporaryFile; }
const File& getTargetFile() const noexcept { return targetFile; }
bool overwriteTargetFileWithTemporary() const;
bool deleteTemporaryFile() const;
private:
//==============================================================================
const File temporaryFile, targetFile;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TemporaryFile)
};
} // namespace juce
juce::File
Definition juce_File.h:45
juce::String
Definition juce_String.h:53
juce::TemporaryFile
Definition juce_TemporaryFile.h:65
juce::TemporaryFile::OptionFlags
OptionFlags
Definition juce_TemporaryFile.h:69
juce::TemporaryFile::putNumbersInBrackets
@ putNumbersInBrackets
Definition juce_TemporaryFile.h:72
juce::TemporaryFile::useHiddenFile
@ useHiddenFile
Definition juce_TemporaryFile.h:70
juce::TemporaryFile::getTargetFile
const File & getTargetFile() const noexcept
Definition juce_TemporaryFile.h:129
juce::TemporaryFile::getFile
const File & getFile() const noexcept
Definition juce_TemporaryFile.h:126
juce::TemporaryFile::TemporaryFile
TemporaryFile(const String &suffix=String(), int optionFlags=0)
Definition juce_TemporaryFile.cpp:52