H5L.exists

Determine if link exists

Syntax

bool = H5L.exists(loc_id,name,lapl_id)

Description

bool = H5L.exists(loc_id,name,lapl_id) checks if a link specified by the pairing of an object id and name exists within a group. lapl_id is a link access property list identifier.

Examples

fid = H5F.open('example.h5');
gid = H5G.open(fid,'/g1/g1.2/g1.2.1');
if H5L.exists(gid,'slink','H5P_DEFAULT')
    fprintf('link exists\n');
else
    fprintf('link does not exist\n');
end