]>
git.saurik.com Git - wxWidgets.git/blob - tests/testfile.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/testfile.h
3 // Purpose: TestFile class
4 // Author: Mike Wetherell
6 // Copyright: (c) 2005 Mike Wetherell
7 // Licence: wxWidgets licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_TESTS_TEMPFILE_H_
11 #define _WX_TESTS_TEMPFILE_H_
13 #include "wx/filefn.h"
14 #include "wx/filename.h"
16 // ----------------------------------------------------------------------------
17 // TestFile: self deleting test file in temporary directory
18 // ----------------------------------------------------------------------------
26 m_name
= wxFileName::CreateTempFileName(wxT("wxtest"), &file
);
27 file
.Write("Before", 6);
30 ~TestFile() { if (wxFileExists(m_name
)) wxRemoveFile(m_name
); }
31 wxString
GetName() const { return m_name
; }
37 #endif // _WX_TESTS_TEMPFILE_H_