FileClose Procedure


FileClose Procedure

Class

Microsoft.VisualBasic.FileSystem

Syntax

     FileClose([fileNumber[, fileNumber[..., fileNumber]]) 


fileNumber (optional; Integer)

One or more file numbers, for files opened with FileOpen, which are to be closed

Description

The FileClose procedure closes one or more files previously opened with the FileOpen procedure. To close multiple files, include them as multiple comma-delimited arguments.

Usage at a Glance

  • If no fileNumber values are included, all open files are closed.

  • If the file you are closing was opened for Output or Append, the remaining data in the I/O buffer is written to the file. The memory buffer is then reclaimed.

  • When the FileClose procedure is executed, the file number used is freed for further use.

Version Differences

  • FileClose is new to VB under .NET. It replaces the Close statement in VB 6.

  • In Visual Basic 2005, the My.Computer.FileSystem object provides more robust access to file management features.

See Also

FileOpen Procedure, Reset Procedure




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net