OpenShot Library | libopenshot-audio
0.2.0
|
26 static File createTempFile (
const File& parentDirectory, String name,
27 const String& suffix,
int optionFlags)
36 : temporaryFile (createTempFile (
File::getSpecialLocation (
File::tempDirectory),
37 "temp_" +
String::toHexString (
Random::getSystemRandom().nextInt()),
38 suffix, optionFlags)),
44 : temporaryFile (createTempFile (target.getParentDirectory(),
45 target.getFileNameWithoutExtension()
46 +
"_temp" +
String::toHexString (
Random::getSystemRandom().nextInt()),
47 target.getFileExtension(), optionFlags)),
51 jassert (targetFile !=
File());
55 : temporaryFile (temporary), targetFile (target)
80 jassert (targetFile !=
File());
82 if (temporaryFile.
exists())
85 for (
int i = 5; --i >= 0;)
106 for (
int i = 5; --i >= 0;)
@ useHiddenFile
Indicates that the temporary file should be hidden - i.e.
File getNonexistentChildFile(const String &prefix, const String &suffix, bool putNumbersInBrackets=true) const
Chooses a filename relative to this one that doesn't already exist.
A random number generator.
Represents a local file or directory.
~TemporaryFile()
Destructor.
bool deleteFile() const
Deletes a file.
bool exists() const
Checks whether the file actually exists.
@ putNumbersInBrackets
Indicates that when numbers are appended to make sure the file is unique, they should go in brackets ...
bool overwriteTargetFileWithTemporary() const
Tries to move the temporary file to overwrite the target file that was specified in the constructor.
TemporaryFile(const String &suffix=String(), int optionFlags=0)
Creates a randomly-named temporary file in the default temp directory.
bool deleteTemporaryFile() const
Attempts to delete the temporary file, if it exists.
bool replaceFileIn(const File &targetLocation) const
Replaces a file.
static void JUCE_CALLTYPE sleep(int milliseconds)
Suspends the execution of the current thread until the specified timeout period has elapsed (note tha...