Problem with CreateFile_()

Just starting out? Need help? Post your questions and find answers here.
infratec
Always Here
Always Here
Posts: 7591
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Problem with CreateFile_()

Post by infratec »

Or in PB

Code: Select all

Procedure.s GETFILETXT(Filename$)
  
  Protected File.i, Result$
  
  File =  ReadFile(#PB_Any, Filename$)
  If File
    Result$ = ReadString(File, #PB_Ascii | #PB_File_IgnoreEOL)
    CloseFile(File)
  EndIf
  
  ProcedureReturn Result$
  
EndProcedure

Debug GETFILETXT("C:\OutOfTheBox\888.txt")
Bernd
Post Reply