MrSID Decode SDK for LiDAR Reference Manual  1.1.3.4427
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  void init(const wchar_t *path, const char *mode);
70 #endif
71 
81  void init(const char *tempdir);
82 #ifdef _WIN32
83 
92  void init(const wchar_t *tempdir);
93 #endif
94 
95  void unlink(void);
96 
104  static void deleteFile(const char *path);
112  static bool fileExists(const char *path);
113 
114 protected:
115  class Imp;
119 };
120 
121 LT_END_LIDAR_NAMESPACE
122 #endif // __LIDAR_FILE_IO_H__
int m_openCount
Definition: FileIO.h:117
static void deleteFile(const char *path)
Delete a file.
bool m_unlinkFile
Definition: FileIO.h:118
Mutex is a cross platform wrapper for mutexes.
Definition: Mutex.h:29
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
Mutex m_openLock
Definition: FileIO.h:115
void unlink(void)
Delete the resource when the IO object is deleted.
void init(const char *path, const char *mode)
Initialize with the file path and access mode.
FileIO implements file-based IO.
Definition: FileIO.h:30

LizardTech