IFileData

Description

interface Tinman.Terrain.Util.IFileData

Derived from

IPathInfo
IValidatable
IConfigurable
IEquatable<IFileData>

Extended by

FileData abstract

Base interface for classes that provide data for files.

Public / Methods

Ascii​Numbers


public method AsciiNumbers → (7)

offset opt : float64 = 0

The offset to apply to parsed decimal numbers, before applying the scale.

scale opt : float64 = 1

The scale to apply to parsed decimal numbers, after applying the offset.

skipLines opt : int32 = 0

[>=0]
The count of initial text lines to skip at the beginning of the text stream.

skipNumbers opt : int32 = 0

[>=0]
The count of initial parsed decimal numbers to skip.

type opt : SampleType = SampleType.Float32

The sample type to use for writing parsed decimal numbers.

order opt : ByteOrder = ByteOrder.LittleEndian

The byte order to use for type opt.

count opt : int32 = 0

[>=0]
The fixed number of decimal numbers to parse or 0 to parse as many numbers as there are in the text stream.

returns → IFileData

The resulting IFileData object.

Treats the file as a text file that contains a sequence of decimal numbers and encodes the values as a binary data stream.

The binary data of this IFileData object is treated as a stream of CharacterEncodingSimple.ASCII characters, which is then split into tokens, using whitespace as separator. Each token is parsed as a decimal number and the resulting sequence of numbers is encoded as a binary data stream.

See also

Image.Raw

Open​Stream


[OwnerReturn]
public method OpenStream → ()

returns → IDataStream

The data stream. The IDataStream.CanSeek might return false.

Opens a sequential data stream that returns the file data.

IOException

If an I/O error has occurred.

Zip


public method Zip → (1)

name opt : string = null

The entry name; if null the first entry will be used.

returns → IFileData

The resulting IFileData object.

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

Public / Attributes

Is​Path​Info​Valid


public attribute IsPathInfoValid → (get)

value : bool

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.

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