is.h5reg
checks if a file (or bytes in memory) looks like
h5reg
file.
Arguments
- x
path to a
.h5
file- ...
Currently ignored
- f
Path to a file on disk
- bytes
A set of bytes that are at least as big as the HDF5 magic value.
Value
a named list describing the contents of an h5reg
file.
Logical indicating whether the file is an HDF5 encoded registration file ('codeh5reg)
Details
if bytes
is passed a raw byte array, then is.h5reg
can
do a very quick check to ensure that it is actually an HDF5 file, before
inspect the contents of the file itself in more detail.
Examples
# \donttest{
h5f <- system.file('samples/complexdummyh5reg.h5', package = 'nat.h5reg')
read.h5reg.info(h5f)
#> $`0`
#> $`0`$dfield
#> $`0`$dfield$ndim
#> [1] 1
#>
#> $`0`$dfield$dims
#> [1] 10
#>
#> $`0`$dfield$nbytes
#> [1] 49
#>
#>
#> $`0`$invdfield
#> $`0`$invdfield$ndim
#> [1] 1
#>
#> $`0`$invdfield$dims
#> [1] 10
#>
#> $`0`$invdfield$nbytes
#> [1] 49
#>
#>
#>
#> $`1`
#> $`1`$dfield
#> $`1`$dfield$ndim
#> [1] 1
#>
#> $`1`$dfield$dims
#> [1] 10
#>
#> $`1`$dfield$nbytes
#> [1] 49
#>
#>
#> $`1`$invdfield
#> $`1`$invdfield$ndim
#> [1] 1
#>
#> $`1`$invdfield$dims
#> [1] 10
#>
#> $`1`$invdfield$nbytes
#> [1] 49
#>
#>
#>
is.h5reg(h5f)
#> [1] TRUE
# }