type is used to handle text files present on disk. The characteristics of this file can be defined and changed using different WLanguage properties.
: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable
// Writing into a text file
MyFile is DiskFile = fOpen("File.txt")
Properties specific to the description of DiskFile variables
The following properties can be used to handle text files:
Remark: The file associated with a DiskFile
variable is automatically closed outside of the scope of the variable.
Functions that use the DiskFile type
|fLock||Entirely or partially locks an external file.|
|fChangeSize||Resizes an external file.|
|fFind||Finds a character string or a buffer in a file opened by fOpen.|
|fUnlock||Entirely or partially unlocks an external file.|
- a character string into an external file.
- a memory section.
|fWriteLine||Writes a line into a text file (ANSI or UNICODE).|
|fClose||Closes an external file.|
- a block of bytes (characters) in an external file (ANSI or Unicode),
- the content of an external file (ANSI or Unicode) and assigns it to a memory area.
|fReadLine||Reads a line from an external file (ANSI or UNICODE).|
|fReadLineRegularExpression||Reads a line in an external file, gets sections of this line according to a regular expression and assigns them to a variable.|
|fFileName||Returns the name of an external file that is currently opened.|
|fSeek||Returns and modifies the current position in an external file.|
|fSize||Returns the size of a file (in bytes).|