SF# 3178098

This commit is contained in:
Marian Krivos
2011-08-18 16:56:45 +00:00
parent f0d857dbde
commit 1a14a27104
2 changed files with 25 additions and 16 deletions

View File

@@ -18,14 +18,14 @@
// execute, and transmit the Software, and to prepare derivative works of the
// Software, and to permit third-parties to whom the Software is furnished to
// do so, all subject to the following:
//
//
// The copyright notices in the Software and this entire statement, including
// the above license grant, this restriction and the following disclaimer,
// must be included in all copies of the Software, in whole or in part, and
// all derivative works of the Software, unless such copies or derivative
// works are solely in the form of machine-executable object code generated by
// a source language processor.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
@@ -67,6 +67,9 @@ public:
TemporaryFile();
/// Creates the TemporaryFile.
TemporaryFile(const std::string& tempDir);
/// Creates the TemporaryFile in the tempDir directory.
~TemporaryFile();
/// Destroys the TemporaryFile and
/// deletes the corresponding file on
@@ -74,9 +77,9 @@ public:
/// has been called.
void keep();
/// Disables automatic deletion of the file in
/// Disables automatic deletion of the file in
/// the destructor.
void keepUntilExit();
/// Disables automatic deletion of the file in
/// the destructor, but registers the file
@@ -85,12 +88,13 @@ public:
static void registerForDeletion(const std::string& path);
/// Registers the given file for deletion
/// at process termination.
static std::string tempName();
static std::string tempName(const std::string& tempDir = "");
/// Returns a unique path name for a temporary
/// file in the system's scratch directory
/// file in the system's scratch directory if argument is empty string
/// or in the provided directory name.
/// (see Path::temp()).
private:
bool _keep;
};