Function Size_File(ByVal fileHandle As HANDLE) As Integer
Возвращает размер файла в байтах
fileHandle - хендл файла
Windows , Linux
#Include "window9.bi"
Dim As Byte Ptr data_
Var handle=Create_File("Пример.txt")
If handle<> Cast(Any Ptr,-1) Then
Write_String(handle,"FreeBasic a good programming language")
Close_file(handle)
EndIf
handle=Read_file("Пример.txt")
If handle<> Cast(Any Ptr,-1) Then
data_=Read_DataS(handle,Size_File(handle))
? PeekS(data_)
Close_file(handle)
If data_ Then DeAllocate(data_)
EndIf
Sleep
FreeBasic a good programming language
Created with the Personal Edition of HelpNDoc: Easily create EBooks