Click or drag to resize

FileToStr Function (String)

X#
Returns the contents of a file as a character string.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION FileToStr(
	cFileName AS STRING
) AS STRING
Request Example View Source

Parameters

cFileName
Type: String
Specifies the name of the file whose contents are returned as a character string. If the file is in a directory other than the current default directory, include a path with the file name.

Return Value

Type: String
Character
Remarks
Note that the size of the character string FileToStr( ) returns can be very large.
Examples
X#
1CD HOME()
2cRedist=FileToStr("REDIST.TXT")
3?OCCURS(".MSM",cRedist)
See Also