Constructors: NewFileStream

NewFileStream

Returns a new FileStream to access an underyling file.



 Public Function NewFileStream(
	  ByRef Path As String,
	  ByVal Mode As FileMode,
	  Optional ByVal Access As FileAccess,
	  Optional ByVal Share As FileShare = FileShare. ReadShare,
	  Optional ByVal BufferSize As Long = 4096,
	  Optional ByVal UseAsync As Boolean = False ) As FileStream

Parameters

Path
[ByRef] String. The name of the file to manipulate.
Mode
[ByVal] FileMode. The method used to create or open a file.
Access
[ByVal] Optional. FileAccess. The access allowed to the file for this FileStream.
Share
[ByVal] Optional. FileShare. The access allowed to the file for other processes.  

Default: FileShare . ReadShare

BufferSize
[ByVal] Optional. Long. The number of bytes used to cache reads and writes from the physical file.  

Default: 4096

UseAsync
[ByVal] Optional. Boolean. Flag used to open the file in asyncronous mode (currently not supported).  

Default: False

Return Values

FileStream -  The new FileStream opened to the specified file.

See Also

Project CorLib Overview

Class Constructors Overview