filename.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/private/filename.h
  3. // Purpose: Internal declarations for src/common/filename.cpp
  4. // Author: Mike Wetherell
  5. // Modified by:
  6. // Created: 2006-10-22
  7. // Copyright: (c) 2006 Mike Wetherell
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_PRIVATE_FILENAME_H_
  11. #define _WX_PRIVATE_FILENAME_H_
  12. #include "wx/file.h"
  13. #include "wx/ffile.h"
  14. // Self deleting temp files aren't supported on all platforms. Therefore
  15. // rather than let these be in the API, they can be used internally to
  16. // implement classes (e.g. wxTempFileStream), that will do the clean up when
  17. // the OS doesn't support it.
  18. // Same usage as wxFileName::CreateTempFileName() with the extra parameter
  19. // deleteOnClose. *deleteOnClose true on entry requests a file created with a
  20. // delete on close flag, on exit the value of *deleteOnClose indicates whether
  21. // available.
  22. #if wxUSE_FILE
  23. wxString wxCreateTempFileName(const wxString& prefix,
  24. wxFile *fileTemp,
  25. bool *deleteOnClose = NULL);
  26. #endif
  27. #if wxUSE_FFILE
  28. wxString wxCreateTempFileName(const wxString& prefix,
  29. wxFFile *fileTemp,
  30. bool *deleteOnClose = NULL);
  31. #endif
  32. // Returns an open temp file, if possible either an unlinked open file or one
  33. // that will delete on close. Only returns the filename if neither was
  34. // possible, so that the caller can delete the file when done.
  35. #if wxUSE_FILE
  36. bool wxCreateTempFile(const wxString& prefix,
  37. wxFile *fileTemp,
  38. wxString *name);
  39. #endif
  40. #if wxUSE_FFILE
  41. bool wxCreateTempFile(const wxString& prefix,
  42. wxFFile *fileTemp,
  43. wxString *name);
  44. #endif
  45. #endif // _WX_PRIVATE_FILENAME_H_