Export (0) Print
Expand All

Reset Function

Closes all disk files opened using the FileOpen function.

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
For fileNumber = 1 To 5    ' Open 5 files.
   FileOpen(fileNumber, "TEST" & fileNumber, OpenMode.Output)
   PrintLine(fileNumber, "Hello World")
Next fileNumber
Reset()   ' Close files and write contents to disk.

Smart Device Developer Notes

This function is not supported.

Requirements

Namespace: Microsoft.VisualBasic

Module: FileSystem

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

See Also

FileClose Function | End Statement | FileOpen Function | File Access with Visual Basic Run-Time Functions

Show:
© 2014 Microsoft