Reset Function 

Closes all disk files opened using the FileOpen function.

The My feature gives you greater productivity and performance in file I/O operations than Reset. For more information, see My.Computer.FileSystem Object.

Public Sub Reset()

Remarks

The Reset function closes all active files opened by the FileOpen function and has the same function as FileClose() without any parameters.

Example

This example uses the Reset function to close all open files and write the contents of all file buffers to disk. Note the use of the Object variable FileNumber as both a string and a number.

' Open 5 files named TEST1, TEST2, etc.
Dim fileNumber As Integer
' Open 5 files.
For fileNumber = 1 To 5
   FileOpen(fileNumber, "TEST" & fileNumber, OpenMode.Output)
   PrintLine(fileNumber, "Hello World")
Next fileNumber
' Close files and write contents to disk.
Reset()

Smart Device Developer Notes

This function is not supported.

Requirements

Namespace: Microsoft.VisualBasic

Module: FileSystem

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

See Also

Reference

FileClose Function
End Statement
FileOpen Function