4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
23 * Class for safely creating temporary files without race conditions.
24 * The file is created in the constructor, and deleted in the destructor.
25 * You may do anything with the file (including deletion), but the instance
26 * of this class must stay alive as long as the file is needed.
31 *Create a temporary file with the given mask.
32 * \p mask must be in filesystem encoding, if it contains a
33 * relative path, the template file will be created in the global
34 * temporary directory as given by 'package().temp_dir()'.
35 * If the mask contains "XXXXXX" this portion will be replaced by
36 * a uniquely generetd string. If it does not contain this portion,
37 * it will be automatically appended using a dot. Therefore, please
38 * specify the "XXXXXX" portion if the extension of the generated
39 * name is important (e.g. for the converter machinery).
41 TempFile(std::string const & mask);
42 TempFile(FileName const & temp_dir, std::string const & mask);
45 * Get the name of the temporary file.
46 * This is empty if the file could not be created.
48 FileName name() const;
55 } // namespace support