The ASP TextStream.Close Method is a predefined method of the TextStream Object which is used to close an opened text file.
Syntax:
TextStreamObject.Close
Example: Below code illustrates the ASP close Method.
<%
dim gfg,f
set gfg=Server.CreateObject("Scripting.FileSystemObject")
// creating the file
set f=gfg.CreateTextFile("e:\Geeks.txt",true)
// Add content
f.WriteLine("Hello Geeks")
//close the file
f.Close
Response.write("File is closed")
set f=nothing
set gfg=nothing
%>
Output:
File is closed