PureFILE library : WinAPI based file functions
Posted: Wed Aug 10, 2005 3:53 pm
PureFILE library V1 (Last update : SEPT 10th 2008)
Overview
Functions
PB3.94 : http://gnozal.ucoz.com/PureFILE.htm
PB4.0x : http://gnozal.ucoz.com/PureFILE_.htm
Example
Download :
Only available for Purebasic Windows x86 (v3.9x-4.3x)
PB3.94 : http://gnozal.ucoz.com/PureFILE.zip
PB4.00-4.10 : http://gnozal.ucoz.com/PureFILE_.zip
PB4.20 : http://gnozal.ucoz.com/PureFILE___.zip
PB4.30 : http://gnozal.ucoz.com/PureFILE_430.zip
Overview
Code: Select all
This user library offers WinAPI based buffered file functions, usually faster than the genuine Purebasic ones, but with a similar syntax.PB3.94 : http://gnozal.ucoz.com/PureFILE.htm
PB4.0x : http://gnozal.ucoz.com/PureFILE_.htm
Example
Code: Select all
If PureFILE_ReadFile(#PB_Any, "C:\PureBasic393\Compilers\APIFunctionListing.txt")
While PureFILE_NotEof()
PureFILE_ReadString()
Wend
PureFILE_CloseFile()
EndIf
;
If PureFILE_ReadFile(1, "C:\PureBasic393\Compilers\APIFunctionListing.txt")
If PureFILE_CreateFile(2, "C:\PureBasic393\Compilers\APIFunctionListing2.txt")
*Buffer = AllocateMemory(50000)
If *Buffer
BytesRead = PureFILE_ReadData(1, *Buffer, 50000)
While BytesRead
BytesWritten = PureFILE_WriteData(2, *Buffer, BytesRead)
BytesRead = PureFILE_ReadData(1, *Buffer, 50000)
Wend
PureFILE_CloseFile(1)
PureFILE_CloseFile(2)
FreeMemory(*Buffer)
EndIf
EndIf
EndIf
;
If PureFILE_ReadTextFile(#PB_Any, "C:\PureBasic393\Program\bigtextfile.txt")
While PureFILE_NotEof()
Line.s = PureFILE_ReadString()
Wend
PureFILE_CloseFile()
Debug Line
EndIfOnly available for Purebasic Windows x86 (v3.9x-4.3x)
PB3.94 : http://gnozal.ucoz.com/PureFILE.zip
PB4.00-4.10 : http://gnozal.ucoz.com/PureFILE_.zip
PB4.20 : http://gnozal.ucoz.com/PureFILE___.zip
PB4.30 : http://gnozal.ucoz.com/PureFILE_430.zip