identify_hdf5#

gwpy.io.hdf5.identify_hdf5(
origin: Literal['read', 'write'],
filepath: FileSystemPath | None = None,
fileobj: FileLike | None = None,
*args: object,
**kwargs: object,
) bool[source]#

Identify an HDF5 file based on its signature.

Parameters:
originstr

Either 'read' or 'write', indicating whether the identification is being done for reading or writing.

filepathstr, pathlib.Path, optional

The file path to check.

fileobjfile-like, optional

A file-like object to check.

args, kwargs

Any additional arguments are passed directly to astropy.io.misc.hdf5.is_hdf5.

Returns:
is_hdf5bool

True if the file is an HDF5 file, False otherwise.

See also

astropy.io.misc.hdf5.is_hdf5