Changes between Version 6 and Version 7 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/File/CFile
- Timestamp:
- 08/23/10 07:47:10 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Prog/Manual/ApplicationLibraries/lib825ev/File/CFile
v6 v7 20 20 }}} 21 21 These constructors construct the file object and attempt to open the file. 22 23 24 ==== Parameters ==== 25 * strFilename - filename 26 * pszFilename - filename 27 * strMode - mode 28 * pszMode - mode 29 30 ==== Examples ==== 22 31 23 32 {{{ … … 30 39 }}} 31 40 41 {{{ 42 CFile fileLog("/mnt/fl1/log.txt"); 43 }}} 44 This contructs the object to open later. 45 46 == Member Functions == 47 48 === Open === 49 Opens a specified file, or using the filename already stored in the object. 50 51 {{{ 52 bool Open(const string& strFilename, const string& strMode); 53 bool Open(const string& strFilename, const char* pszMode); 54 bool Open(const char* pszFilename, const string& strMode); 55 bool Open(const char* pszFilename, const char* pszMode); 56 bool Open(const char* pszMode); 57 }}} 58 32 59 ==== Parameters ==== 33 60 * strFilename - filename … … 36 63 * pszMode - mode 37 64 38 == Member Functions ==39 40 === Open ===41 Opens a specified file, or using the filename already stored in the object.42 43 {{{44 bool Open(const string& strFilename, const string& strMode);45 bool Open(const string& strFilename, const char* pszMode);46 bool Open(const char* pszFilename, const string& strMode);47 bool Open(const char* pszFilename, const char* pszMode);48 bool Open(const char* pszMode);49 }}}50 51 ==== Parameters ====52 * strFilename - filename53 * pszFilename - filename54 * strMode - mode55 * pszMode - mode56 57 65 ==== Return Value ==== 58 66 … … 116 124 117 125 ==== Remarks ==== 126 127 IsReady() will return false if the CTS line is unconnected. Printers or other devices must be wired correctly for applications to be able to use this function to determine their readiness. 118 128 119 129 ==== Example ==== … … 160 170 === GetFile === 161 171 162 * FILE* GetFile(void); 172 {{{ 173 FILE* GetFile(void); 174 }}} 163 175 164 176 === Print === 165 177 166 * void Print(const std::string& fmt, ...); 167 * void Print(const char * fmt, va_list& args); 168 * void Print(const std::string& fmt, va_list& args); 169 * void Print(const char * fmt, va_list& args); 178 {{{ 179 void Print(const std::string& fmt, ...); 180 void Print(const char * fmt, va_list& args); 181 void Print(const std::string& fmt, va_list& args); 182 void Print(const char * fmt, va_list& args); 183 }}} 170 184 171 185 === SetNonBlocking === 172 186 173 * void SetNonBlocking(void); 174 187 {{{ 188 void SetNonBlocking(void); 189 }}} 175 190 176 191 177 192 === Read === 178 193 179 * bool Read(void * ptr, size_t size); 194 {{{ 195 bool Read(void * ptr, size_t size); 196 }}} 180 197 181 198 === Write === 182 199 183 * bool Write(void * buf, size_t size); 200 {{{ 201 bool Write(void * buf, size_t size); 202 }}} 184 203 185 204 === GetBytesRead === 186 205 187 * size_t GetBytesRead(void); 206 {{{ 207 size_t GetBytesRead(void); 208 }}} 188 209 189 210 === GetbytesWritten === 190 211 191 * size_t GetBytesWritten(void); 212 {{{ 213 size_t GetBytesWritten(void); 214 }}} 192 215 193 216 === Seek === 194 217 195 * bool Seek(long int offset, long int origin = SEEK_SET); 196 197 218 {{{ 219 bool Seek(long int offset, long int origin = SEEK_SET); 220 }}} 221