Mono Class Library: Mono.Unix.StdioFileStream Overview | Members

Mono.Unix.StdioFileStream Constructor

Creates a Mono.Unix.StdioFileStream type, wrapping the existing unmanaged FILE pointer fileStream.

public StdioFileStream (IntPtr fileStream, bool ownsHandle)

Parameters

fileStream
A IntPtr containing a FILE pointer
ownsHandle
A bool specifying whether or not the created Mono.Unix.StdioFileStream instance "owns" fileStream.

Exceptions

TypeReason
ArgumentExceptionfileStream is an invalid FILE pointer.

Remarks

If ownsHandle is true, then fileStream will be closed via Mono.Unix.Native.Stdlib.fclose when StdioFileStream.Close is invoked (which is also called from the finalizer and from the IDisposable implementation). Otherwise, fileStream will only be flushed on StdioFileStream.Close and not actually closed.

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0