00001
00002
00003
00004
00005
00006
00007
00008
00010
00011
00012 #ifndef __LIDAR_FILE_IO_H__
00013 #define __LIDAR_FILE_IO_H__
00014
00015 #include "lidar/IO.h"
00016 #include "lidar/Mutex.h"
00017
00018 LT_BEGIN_LIDAR_NAMESPACE
00019
00030 class FileIO : public IO
00031 {
00032 CONCRETE_OBJECT(FileIO);
00033 public:
00034
00051 void init(const char *path, const char *mode);
00052 #ifdef _WIN32
00053
00069 void init(const wchar_t *path, const char *mode);
00070 #endif
00071
00081 void init(const char *tempdir);
00082 #ifdef _WIN32
00083
00092 void init(const wchar_t *tempdir);
00093 #endif
00094
00095 void unlink(void);
00096
00104 static void deleteFile(const char *path);
00112 static bool fileExists(const char *path);
00113
00114 protected:
00115 class Imp;
00116 Mutex m_openLock;
00117 int m_openCount;
00118 bool m_unlinkFile;
00119 };
00120
00121 LT_END_LIDAR_NAMESPACE
00122 #endif // __LIDAR_FILE_IO_H__