help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions] Reference for unit 'StrWrap1' (#powtils_main)

StrLoadFile

Declaration

Source position: strwrap1.pas line 74

function StrLoadFile(

  const fname: String

):String;

Notes

Loads the content of a file directly into an ansistring.

It currently loads the entire file into memory in one single blockread, and is very fast.

It is essentially a FileToString or File2String function.

Returns the string '-1NF' if the file was not found or there was a problem reading the file. Otherwise, it returns the file contents in a string.

Note: This function has not been tested on large files (i.e. 5GB). It is meant for loading medium or small sized files quickly and directly into a string.






lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505