protected H5File(hid_t fid, string path, string mode) : base(fid) { Path = path; Mode = mode; Root = H5Group.Open(ID, key: "/", writable: mode != "r"); }
/// <summary> /// Access the sub-Group given by `key` relative to this Group. /// If the sub-Group does not exist and `create = false` (default), /// a `KeyNotFoundException` is thrown. /// An attempt to create multiple groups or to write a readonly-file /// will throw an `InvalidOperationException`. /// </summary> public H5Group SubGroup(string key, bool create = false) { if (H5Link.Exists(ID, key)) { return(H5Group.Open(ID, key, IsWritable)); } if (create) { return(CreateGroup(key)); } else { throw new KeyNotFoundException(key); } }