TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IFileData in Tinman.Terrain.Util

Base interface for classes that provide data for files.

interface IFileData extends IConfigurable
  IEquatable<IFileData>
  IPathInfo
  IValidatable
  base of FileData

Attributes

IsPathInfoValid

Can the PathInfo value be used to access the file data in the local filesystem?

property IsPathInfoValid { get }
type bool
value true if the path info points to a valid file or directory in the local filesystem, false if it is some artificial or virtual value.

PathInfo

Returns a Path object that represents the file path this object is associated with.

property PathInfo { get }
type Path
value [not-null] The path info.
inherited IPathInfo.PathInfo

Remarks:

Objects that do not have a meaningful file path association simply return Unknown.

Methods

OpenStream

Opens a sequential data stream that returns the file data.

[OwnerReturn]
method OpenStream ()
type IDataStream
returns [not-null] The data stream. The CanSeek might return false.

ToConfig

Returns the configuration value that describes this object.

method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
inherited IConfigurable.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.

Validate

Validates the state of this object.

method Validate (Validator validator)
params validator [not-null] The validator object.
inherited IValidatable.Validate

Zip

Treats the file as an archive (the archive format is guessed from the file extension) and extracts the given entry.

method Zip (string name = null)
type IFileData
params name The entry name; if null the first entry will be used.
returns [not-null] The resulting IFileData object.