FileProgress()
Syntax
Result.f = FileProgress(#File)Description
Return the current progress (in percent) of the current file loading. It is only available with ReadFile() without the #PB_File_Streaming flag. Can be useful to monitor big files loading.
Parameters
#File The file to use.
Return value
Return the current progress (in percent) of the current file loading.
Example
Procedure ReadCallback(Status, Filename$, File, Size)
If Status = #PB_Status_Loaded
Debug "File: " + Filename$ + " - Size read: " + Size + " bytes"
ElseIf Status = #PB_Status_Progress
Debug "Loading file: " + Filename$ + " (" + FileProgress(0) + "%)"
ElseIf Status = #PB_Status_Error
Debug "Error when loading the file: " + Filename$
EndIf
EndProcedure
ReadFile(0, "yourbigfilehere", @ReadCallback())
See Also
ReadFile()
Supported OS
All