ערוך

שתף באמצעות


FileSystem.Reset Method

Definition

Closes all disk files opened by using the FileOpen function. The My feature gives you better productivity and performance in file I/O operations than Reset. For more information, see FileSystem.

public:
 static void Reset();
public static void Reset ();
static member Reset : unit -> unit
Public Sub Reset ()

Examples

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()

Remarks

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

Applies to

See also