Name | FTPit_LocalReadFile |
---|
Description | Reads in the characters or lines of a file.
|
---|
Format | FTPit_LocalReadFile ( File ; Start ; Amount ; ReadLines ) |
---|
Required Parameters | File The path of the local file to read. [This can be a full path or a path relative to the current local directory.]
|
---|
Optional Parameters | - Start
The starting character position or line. If negative, the position will be relative to the end of the file. [Default is 0.]
- Amount
The number of characters or lines to read. [Default is all or the remaining part of the file.]
- ReadLines
If True, the start and amount parameters refer to the number of lines instead of characters. [Default is False.]
|
---|
Examples | - Example 1
Reads in all the data from the Data.txt file. FTPit_LocalReadFile ( "~/Desktop/Data.txt" )
- Example 2
Reads in 10 characters of data from the Data.txt file starting with the 4th character. Note, the first character of the file is in position 0, which is why you get the 4th character when using a value of 3 as the Start parameter. FTPit_LocalReadFile ( "C:\Users\Bob\Desktop\Data.txt"; 3; 10 )
- Example 3
Reads in all the data from the Data.txt file using the ReadLines option. FTPit_LocalReadFile ( "C:\Users\Bob\Desktop\Data.txt"; ""; ""; True )
|
---|