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

interface IFileOps in Tinman.Core.IO.Files

Defines common operations of IFile objects.

interface IFileOps extends IDataStreamFactory
  base of IFile

Remarks

The IFile object that is returned by the operation methods must be used by the caller instead of the IFile on which the method has been called.

Methods

Cache

Returns a IFile that accesses this file through the given in-memory file cache.

[OwnerReturn, OwnerThis]
method Cache (FileCache cache)
type IFile
params cache [not-null] The cache to use.
returns [not-null] The resulting IFile object.

Offset

Returns a IFile that accesses the data in this file using the given byte offset.

[OwnerReturn, OwnerThis]
method Offset (int64 offset)
type IFile
params offset [>=0] Absolute offset in this file that will be mapped to offset 0 in the returned file.
returns [not-null] The resulting IFile object.

ReadArchive

Reads the file content as an archive.

[OwnerReturn]
method ReadArchive (string entry = null)
type IDataStream
params entry Name of the archive entry to read or null to read the first entry.
returns [not-null] The data stream that reads the uncompressed archive entry.

ReadOnly

Returns a read-only view on this IFile.

[OwnerReturn, OwnerThis]
method ReadOnly ()
type IFile
returns [not-null] The resulting IFile object.

ToDataStream

Creates an IDataStream object for accessing the data of this object.

[OwnerReturn, OwnerThis]
method ToDataStream (int32 bufferSize = 65536, bool needLength = true)
type IDataStream
params bufferSize [>0] The buffer size to use, in bytes. Defaults to 65536.
  needLength Shall the returned data stream report a proper length (if possible) with its Length property? Defaults to true.
returns [not-null] The data stream.
inherited IDataStreamFactory.ToDataStream