Click or drag to resize

Dfs1File Class

Dfs1 file class

Use the DfsFileFactory to open an existing dfs1 file.

Use the Dfs1Builder to create a new dfs1 file.

Inheritance Hierarchy

Namespace:  DHI.Generic.MikeZero.DFS.dfs123
Assembly:  DHI.Generic.MIKEZero.DFS (in DHI.Generic.MIKEZero.DFS.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class Dfs1File : Dfs123File, IDfs1File, 
	IDfs123File, IDfsFileIO, IDfsFileStaticIO, IDisposable

The Dfs1File type exposes the following members.

Constructors
  NameDescription
Public methodDfs1File
Wrap a dfs file object in a dfs1 file object.

If dfs file is not a dfs1 file, behavior is undefined.

Top
Properties
  NameDescription
Public propertyFileInfo
File info
(Inherited from Dfs123File.)
Public propertyFileName
Name of file.
(Inherited from Dfs123File.)
Public propertyItemInfo
Information on all the dynamic items in the file.
(Inherited from Dfs123File.)
Public propertySpatialAxis
Spatial axis that are valid for all dynamic and static items.
(Inherited from Dfs123File.)
Top
Methods
  NameDescription
Public methodClose (Inherited from Dfs123File.)
Public methodDfsCurrentVersion
Returns the current version of the Dfs file library
(Inherited from Dfs123File.)
Public methodDispose
Close file and release ressources on the unmanaged side.
(Inherited from Dfs123File.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFindItem
Positions the file pointer at the location in the file where the specified dynamic item at the specified time step starts.
(Inherited from Dfs123File.)
Public methodFindTimeStep
Positions the file pointer at the location in the file where the specified time step starts.
(Inherited from Dfs123File.)
Public methodFlush (Inherited from Dfs123File.)
Public methodFlushTimeStep (Inherited from Dfs123File.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodReadItemTimeStep(Int32, Int32)
Public methodReadItemTimeStep(IDfsItemData, Int32)
Public methodReadItemTimeStepNext
Public methodReadStaticItem (Inherited from Dfs123File.)
Public methodReadStaticItemNext (Inherited from Dfs123File.)
Public methodReset
Resets the file pointer to point on the first dynamic item time step in the file.

Can also be used if it is required to restart reading the static items.

(Inherited from Dfs123File.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteItemTimeStep
Writes data to the specified item and timestep in the file.

If the item-timestep exists already, data is updated. If it does not exist, the item number and timestep index must match exactly the next item-timestep after the last one in the file.

The size of the data must match the data size of the item that is to be written.

The time value is only relevant for files with non-equidistant time axis. For files with an equidistant time axis, the time value is ignored, and a zero can be used.

(Inherited from Dfs123File.)
Public methodWriteItemTimeStepNext

Writes the next dynamic item-timestep.

If the file pointer points to the end of the file, this will append a new item-timestep to the file. If the file pointer points to an existing item-timestep, the data of that item-timestep is updated.

Remember that the file pointer position depends on the mode that the file was opened: In edit mode the file pointer points at the first item-timestep. In append mode the file pointer points initially at the end of file.

It iterates over the item-timesteps as the ReadItemTimeStepNext, see there for more details.

This is the most efficient way to iterate through and update/append the items and timesteps in a file, since it iterates exactly as the data is stored on the disk.

The size of the data must match the data size of the item that is to be written.

The time value is only relevant for files with non-equidistant time axis. For files with an equidistant time axis, the time value is ignored, and a zero can be used.

(Inherited from Dfs123File.)
Public methodWriteStaticItemData (Inherited from Dfs123File.)
Top
Extension Methods
  NameDescription
Public Extension MethodReadFloatDataForItem
Read float data for the specified item and the specified time step indices.

If itemnumber or one of the time step indices is out of range, an exception is thrown.

(Defined by Dfs1Util.)
Top
See Also