Closes a file on the host system.
FileClose(hFile)
Variable | Description |
---|---|
hFile | The handle of the file to close. HFILE. |
FileClose closes the file identified by hFile. You return a handle to the file (an HFILE) by calling the FileOpen function.
Silk Test Classic raises the exception E_HANDLE if the file has already been closed or if an invalid file handle is specified.
This function is not designed for remote access.
// output file handle HFILE OutputFileHandle // Create and open file for writing, // write to it, then close OutputFileHandle = FileOpen("mydata.txt", FM_WRITE) FileWriteLine(OutputFileHandle, "First line of text") FileClose(OutputFileHandle)