|
Previous Top Next |
Prototype: | (String pFileName),LONG,PROC |
pFileName | Filename to read |
Returns | Number of bytes read. |
This is a very powerful method that uses API to read a file into a dynamic string containing the entire file. The file is read into a single buffer so the reading is extremely fast. While this is primarily designed for text files, this method could be used to read just about any kind of file. Once the file is read the contents is stored in the FileString property where you can manipulate it. Because of this you need to make sure that you do not have important data in the FileString property before you call this method.
Example:
ITS ITStringClass
Code
ITS.ReadFileToString('c:\temp\test.txt')
!! You can now access the contents of test.txt by using the ITS.FileString property.
See also: