Janilabo

Janilabo | ReadFile() [Simba]

Aug 19th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.28 KB | None | 0 0
  1. function ReadFile(path: string): string;
  2. var
  3.   f: Integer;
  4. begin
  5.   if not FileExists(path) then
  6.     Exit;
  7.   f := OpenFile(path, False);
  8.   ReadFileString(f, Result, FileSize(f));
  9.   CloseFile(f);
  10. end;
  11.  
  12. begin
  13.   ClearDebug;
  14.   WriteLn(ReadFile(AppPath + 'settings.xml'));
  15. end.
Advertisement
Add Comment
Please, Sign In to add comment