Class H5File
- Namespace
- PureHDF
- Assembly
- PureHDF.dll
Entry-point for PureHDF.
public class H5File : H5Group, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
- Inheritance
-
H5File
- Implements
- Inherited Members
Constructors
H5File()
public H5File()
Methods
BeginWrite(Stream, H5WriteOptions?)
Writes the contents to the specified stream and returns a writer which allows to write more data to the stream until the writer gets disposed.
public H5NativeWriter BeginWrite(Stream stream, H5WriteOptions? options = null)
Parameters
streamStreamThe stream to write the contents into. It must be readable, writeable and seekable.
optionsH5WriteOptionsOptions to control encoding behavior.
Returns
BeginWrite(string, H5WriteOptions?)
Creates a new file, write the contents to the file and returns a writer which allows to write more data to the file until the writer gets disposed. If the target file already exists, it is overwritten.
public H5NativeWriter BeginWrite(string filePath, H5WriteOptions? options = null)
Parameters
filePathstringThe path of the file to write the contents into.
optionsH5WriteOptionsOptions to control encoding behavior.
Returns
Open(MemoryMappedViewAccessor, H5ReadOptions?)
Opens an HDF5 memory-mapped file.
public static NativeFile Open(MemoryMappedViewAccessor accessor, H5ReadOptions? options = null)
Parameters
accessorMemoryMappedViewAccessorThe memory-mapped accessor to use.
optionsH5ReadOptionsOptions to control decoding behavior.
Returns
Open(Stream, bool, H5ReadOptions?)
Opens an HDF5 stream.
public static NativeFile Open(Stream stream, bool leaveOpen = false, H5ReadOptions? options = null)
Parameters
streamStreamThe stream to use. It must be readable and seekable.
leaveOpenboolA boolean which indicates if the stream should be kept open when this class is disposed. The default is false.
optionsH5ReadOptionsOptions to control decoding behavior.
Returns
Open(string, FileMode, FileAccess, FileShare, H5ReadOptions?)
Opens an HDF5 file.
public static NativeFile Open(string filePath, FileMode mode, FileAccess fileAccess, FileShare fileShare, H5ReadOptions? options = null)
Parameters
filePathstringThe path of the file to open.
modeFileModeA FileMode value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.
fileAccessFileAccessA FileAccess value that specifies the operations that can be performed on the file.
fileShareFileShareA FileShare value specifying the type of access other threads have to the file.
optionsH5ReadOptionsOptions to control decoding behavior.
Returns
OpenRead(string, H5ReadOptions?)
Opens an HDF5 file for reading. Please see the Remarks section for more information how the file is opened.
public static NativeFile OpenRead(string filePath, H5ReadOptions? options = null)
Parameters
filePathstringThe path of the file to open.
optionsH5ReadOptionsOptions to control decoding behavior.
Returns
Write(Stream, H5WriteOptions?)
Writes the contents to the specified stream.
public void Write(Stream stream, H5WriteOptions? options = null)
Parameters
streamStreamThe stream to write the contents into. It must be readable, writeable and seekable.
optionsH5WriteOptionsOptions to control encoding behavior.
Write(string, H5WriteOptions?)
Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.
public void Write(string filePath, H5WriteOptions? options = null)
Parameters
filePathstringThe path of the file to write the contents into.
optionsH5WriteOptionsOptions to control encoding behavior.