Export (0) Print
Expand All
2 out of 6 rated this helpful - Rate this topic

FileStream Members

Exposes a Stream around a file, supporting both synchronous and asynchronous read and write operations.

The following tables list the members exposed by the FileStream type.

  Name Description
Public method Supported by the .NET Compact Framework FileStream Overloaded. Initializes a new instance of the FileStream class.
Top
  Name Description
Public property Supported by the .NET Compact Framework CanRead Gets a value indicating whether the current stream supports reading.
Public property Supported by the .NET Compact Framework CanSeek Gets a value indicating whether the current stream supports seeking.
Public property Supported by the .NET Compact Framework CanTimeout  Gets a value that determines whether the current stream can time out.(Inherited from Stream.)
Public property Supported by the .NET Compact Framework CanWrite Gets a value indicating whether the current stream supports writing.
Public property Handle Gets the operating system file handle for the file that the current FileStream object encapsulates.
Public property Supported by the .NET Compact Framework IsAsync Gets a value indicating whether the FileStream was opened asynchronously or synchronously.
Public property Supported by the .NET Compact Framework Length Gets the length in bytes of the stream.
Public property Supported by the .NET Compact Framework Name Gets the name of the FileStream that was passed to the constructor.
Public property Supported by the .NET Compact Framework Position Gets or sets the current position of this stream.
Public property Supported by the .NET Compact Framework ReadTimeout  Gets or sets a value that determines how long the stream will attempt to read before timing out. (Inherited from Stream.)
Public property SafeFileHandle Gets a SafeFileHandle object that represents the operating system file handle for the file that the current FileStream object encapsulates.
Public property Supported by the .NET Compact Framework WriteTimeout  Gets or sets a value that determines how long the stream will attempt to write before timing out. (Inherited from Stream.)
Top
(see also Protected Methods )
  Name Description
Public method BeginRead Overridden. Begins an asynchronous read.
Public method BeginWrite Overridden. Begins an asynchronous write.
Public method Supported by the .NET Compact Framework Close  Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. (Inherited from Stream.)
Public method CreateObjRef  Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Supported by the .NET Compact Framework Dispose Overloaded.  
Public method EndRead Overridden. Waits for the pending asynchronous read to complete.
Public method EndWrite Overridden. Ends an asynchronous write, blocking until the I/O operation has completed.
Public method Supported by the .NET Compact Framework Equals  Overloaded. Determines whether two Object instances are equal. (Inherited from Object.)
Public method Supported by the .NET Compact Framework Flush Overridden. Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Public method GetAccessControl Gets a FileSecurity object that encapsulates the access control list (ACL) entries for the file described by the current FileStream object.
Public method Supported by the .NET Compact Framework GetHashCode  Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.)
Public method GetLifetimeService  Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Supported by the .NET Compact Framework GetType  Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService  Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Lock Prevents other processes from changing the FileStream while permitting read access.
Public method Supported by the .NET Compact Framework Read Overridden. Reads a block of bytes from the stream and writes the data in a given buffer.
Public method Supported by the .NET Compact Framework ReadByte Overridden. Reads a byte from the file and advances the read position one byte.
Public method Static Supported by the .NET Compact Framework ReferenceEquals  Determines whether the specified Object instances are the same instance. (Inherited from Object.)
Public method Supported by the .NET Compact Framework Seek Overridden. Sets the current position of this stream to the given value.
Public method SetAccessControl Applies access control list (ACL) entries described by a FileSecurity object to the file described by the current FileStream object.
Public method Supported by the .NET Compact Framework SetLength Overridden. Sets the length of this stream to the given value.
Public method Static Synchronized  Creates a thread-safe (synchronized) wrapper around the specified Stream object. (Inherited from Stream.)
Public method Supported by the .NET Compact Framework ToString  Returns a String that represents the current Object. (Inherited from Object.)
Public method Unlock Allows access by other processes to all or part of a file that was previously locked.
Public method Supported by the .NET Compact Framework Write Overridden. Writes a block of bytes to this stream using data from a buffer.
Public method Supported by the .NET Compact Framework WriteByte Overridden. Writes a byte to the current position in the file stream.
Top
  Name Description
Protected method Supported by the .NET Compact Framework CreateWaitHandle  Allocates a WaitHandle object. (Inherited from Stream.)
Protected method Supported by the .NET Compact Framework Dispose Overloaded. Overridden.  
Protected method Finalize Overridden. Ensures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the FileStream.
Protected method Supported by the .NET Compact Framework MemberwiseClone  Overloaded. (Inherited from MarshalByRefObject.)
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.