Export (0) Print
Expand All

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 Supported by the XNA Framework FileStream Overloaded. Initializes a new instance of the FileStream class.
Top

  Name Description
Public property Supported by the .NET Compact Framework Supported by the XNA Framework CanRead Gets a value indicating whether the current stream supports reading.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework CanSeek Gets a value indicating whether the current stream supports seeking.
Public property Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA 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 Supported by the XNA Framework IsAsync Gets a value indicating whether the FileStream was opened asynchronously or synchronously.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Length Gets the length in bytes of the stream.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Name Gets the name of the FileStream that was passed to the constructor.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Position Gets or sets the current position of this stream.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework ReadTimeout  Gets or sets a value, in miliseconds, 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 Supported by the XNA Framework WriteTimeout  Gets or sets a value, in miliseconds, 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 Supported by the .NET Compact Framework BeginRead Overridden. Begins an asynchronous read.
Public method Supported by the .NET Compact Framework BeginWrite Overridden. Begins an asynchronous write.
Public method Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework Dispose Overloaded.  
Public method Supported by the .NET Compact Framework EndRead Overridden. Waits for the pending asynchronous read to complete.
Public method Supported by the .NET Compact Framework EndWrite Overridden. Ends an asynchronous write, blocking until the I/O operation has completed.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Flush Overridden. Clears all buffers for this stream and causes any buffered data to be written to the file system.
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 Supported by the XNA Framework GetHashCode  Serves as a hash function for a particular type. (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 Supported by the XNA 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 Supported by the XNA 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 Supported by the XNA 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 Supported by the XNA 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 Supported by the XNA 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 Supported by the XNA 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 Supported by the XNA Framework Write Overridden. Writes a block of bytes to this stream using data from a buffer.
Public method Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework CreateWaitHandle  Allocates a WaitHandle object. (inherited from Stream)
Protected method Supported by the .NET Compact Framework Supported by the XNA Framework Dispose Overloaded. Overridden.  
Protected method Supported by the .NET Compact Framework Supported by the XNA Framework 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

Community Additions

ADD
Show:
© 2014 Microsoft