NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FileStream Methods

The methods of the FileStream class are listed below. For a complete list of FileStream class members, see the FileStream Members topic.

Public:

BeginRead Begins an asynchronous read.
BeginWrite Begins an asynchronous write.
Close Releases any resources, namely the file handle, associated with the current file stream.
EndRead Ends a pending asynchronous read request. EndRead blocks until the read request has completed.
EndWrite Ends an asynchronous write. It will block until the IO operation has completed.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
Flush Updates the file with the current state of the buffer and subsequently clears the buffer.
GetHandle Gets the file handle for the file that the current FileStream object encapsulates.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) Gets the Type of the Object.
Lock Prevents access by other processes to all or part of a file.
Read Reads a block of bytes from the stream and writes the data in a given buffer.
ReadByte Reads a byte from the file stream. Returns the byte cast to an int or-1 if reading from the end of the stream.
Seek Sets the current position of this stream to the given value.
SetLength Sets the length of this stream to the given value.
ToString (inherited from Object) Returns a String that represents the current Object.
Unlock Allows access by other processes to all or part of a file that was previously locked.
Write Writes a block of bytes to this stream using data from a buffer.
WriteByte Writes a byte to the current position in the file stream.

Protected:

CreateWaitHandle (inherited from Stream) Allocates a WaitHandle object efficiently.
Finalize Called by the garbage collector when the current object is ready to be finalized.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

FileStream Class | System.IO Namespace