Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

NodeContent Class

Namespace: Rebex.IO.FileSystem
Assembly: Rebex.Common.dll (version 7.0.9119)

Represents a content of a file.

Syntax
public sealed class NodeContent : IDisposable
Inheritance
Object
NodeContent
Implements
IDisposable
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()

Properties

Name Description
IsDelayedWriteContent

Gets a value indicating whether the underlying stream of this instance is a 'delayed write' stream.

IsImmediateWriteContent

Gets a value indicating whether the underlying stream of this instance is an 'immediate write' stream.

IsReadOnly

Gets a value indicating whether the underlying stream of this instance is read only.

Length

Gets the length in bytes of the Stream that is returned from the GetStream() method.

WasStreamClosedForcefully

Returns a value indicating whether this node's stream was closed forcefully. Forceful close occurs if the stream is not gracefully closed by the consumer.

Methods

Name Description
CreateDelayedWriteContent(Stream)

Method creates read/delayed write content from the given stream. Use this method when following is desired/acceptable behavior:

  • Underlying stream does not support immediate writing to the file.
  • When NodeContent previously returned from this method is disposed and underlying stream has been changed, then the method Rebex.IO.FileSystem.ReadWriteFileSystemProvider.SaveContent in the ReadWriteFileSystemProvider is called.

Following events are raised in the FileSystemNotifier:

  • SaveContentPreview.
  • SaveContentSurrogate.
  • SaveContentCompleted.
CreateImmediateWriteContent(Stream)

Method creates read/immediate write content from the given stream. Use this method when following is desired/acceptable behavior:

  • Stream supports immediate writing to the file (e. g. FileStream).
  • SaveContent method in ReadWriteFileSystemProvider is NEVER called. All data are written immediately using the suitable stream write methods.

Following events are NOT raised in the FileSystemNotifier:

  • SaveContentPreview.
  • SaveContentSurrogate.
  • SaveContentCompleted.
CreateReadOnlyContent(Stream)

Method creates read only content from the given stream.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting resources.

GetStream()

Returns Stream with the content of the file.

In This Article
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies