Changes between Version 20 and Version 21 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/File/CFile
- Timestamp:
- 08/23/10 14:03:30 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Prog/Manual/ApplicationLibraries/lib825ev/File/CFile
v20 v21 305 305 306 306 === GetFile === 307 Get the file handle of the member FILE. 307 308 308 309 {{{ 309 310 FILE* GetFile(void); 310 311 }}} 312 ==== Parameters ==== 313 Function does not accept any parameters 314 ==== Return Value ==== 315 316 Function returns FILE handle of underlying FILE. 317 318 ==== Remarks ==== 319 320 ==== Example ==== 321 322 {{{ 323 CFile file("/tmp/test", "w"); 324 if(file.IsOpen()) 325 { 326 fprintf(file.GetFile(), "This is a test\r\n"); 327 file.Close(); 328 } 329 }}} 330 In the above example the fprintf could be replaced with ''file.Print("This is a test\r\n");'' eliminating the need for the GetFile() call. 311 331 312 332 === Print === … … 390 410 391 411 === Read === 392 393 {{{ 394 bool Read(void * ptr, size_t size); 395 }}} 412 Reads a binary block of data from a file. 413 {{{ 414 bool Read(void *pData, size_t nSize); 415 }}} 416 417 ==== Parameters === 418 * pData - pointer to memory to store data received. The application must have sufficient memory allocated. 419 * nSize - number of bytes to read. 420 421 ==== Return Value ==== 422 423 Function returns true if the specified number of bytes were read 424 425 ==== Remarks ==== 426 427 ==== Example ==== 428 396 429 397 430 === Write === 398 399 {{{ 400 bool Write(void * buf, size_t size); 401 }}} 431 Writes a binary block of data to a file. 432 {{{ 433 bool Write(void *pData, size_t nSize); 434 }}} 435 436 ==== Parameters ==== 437 * pData - pointer to memory to store data received. The application must have sufficient memory allocated. 438 * nSize - number of bytes to read. 439 440 ==== Return Value ==== 441 442 Function returns true if the specified number of bytes were written. 443 444 ==== Remarks ==== 445 446 ==== Example ==== 402 447 403 448 === GetBytesRead === 404 449 Returns how may bytes were read from previous Read function. 405 450 {{{ 406 451 size_t GetBytesRead(void); 407 452 }}} 408 453 454 ==== Parameters ==== 455 Function does not accept any parameters. 456 457 ==== Return Value ==== 458 459 Function returns number of bytes read from the previous read operation. 460 461 ==== Example ==== 462 463 409 464 === GetbytesWritten === 465 Returns how may bytes were written from previous Write function. 410 466 411 467 {{{ … … 413 469 }}} 414 470 471 ==== Parameters ==== 472 Function does not accept any parameters. 473 474 ==== Return Value ==== 475 476 Function returns number of bytes read from the previous read operation. 477 478 ==== Example ==== 479 480 415 481 === Seek === 416 482