MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
FileIO.h
Go to the documentation of this file.
1 /* //////////////////////////////////////////////////////////////////////////
2 // //
3 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western //
4 // Avenue, Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5 // prohibited. Access to and use of this code is permitted only under //
6 // license from LizardTech, Inc. Portions of the code are protected by //
7 // US and foreign patents and other filings. All Rights Reserved. //
8 // //
10 /* PUBLIC */
11 
12 #ifndef __LIDAR_FILE_IO_H__
13 #define __LIDAR_FILE_IO_H__
14 
15 #include "lidar/IO.h"
16 #include "lidar/Mutex.h"
17 
18 LT_BEGIN_LIDAR_NAMESPACE
19 
30 class FileIO : public IO
31 {
32  CONCRETE_OBJECT(FileIO);
33 public:
34 
51  void init(const char *path, const char *mode);
52 #ifdef _WIN32
53 
69 #ifdef SWIG
70  void init(const wchar_t *path, const char *mode);
71 #else
72  void init(const unsigned short *path, const char *mode);
73  void init(const __wchar_t *path, const char *mode);
74 #endif
75 #endif
76 
86  void init(const char *tempdir);
87 #ifdef _WIN32
88 
97 #ifdef SWIG
98  void init(const wchar_t *tempdir);
99 #else
100  void init(const unsigned short *tempdir);
101  void init(const __wchar_t *tempdir);
102 #endif
103 #endif
104 
105  void unlink(void);
106 
114  static void deleteFile(const char *path);
122  static bool fileExists(const char *path);
123 
124 protected:
125  class Imp;
129 };
130 
131 LT_END_LIDAR_NAMESPACE
132 #endif // __LIDAR_FILE_IO_H__
void init(const char *path, const char *mode)
Initialize with the file path and access mode.
static bool fileExists(const char *path)
Test if the file exists.
IO is the base class for binary input and output.
Definition: IO.h:29
static void deleteFile(const char *path)
Delete a file.
Mutex m_openLock
Definition: FileIO.h:125
FileIO implements file-based IO.
Definition: FileIO.h:30
int m_openCount
Definition: FileIO.h:127
void unlink(void)
Delete the resource when the IO object is deleted.
Mutex is a cross platform wrapper for mutexes.
Definition: Mutex.h:29
bool m_unlinkFile
Definition: FileIO.h:128

LizardTech