Skip to content

Commit 5381505

Browse files
committed
add metadata setter
1 parent aab09cb commit 5381505

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

+nix/MetadataMixIn.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@
2323
strcat(obj.alias, '::openMetadataSection'), ...
2424
obj.nix_handle, obj.metadataCache, @nix.Section);
2525
end;
26-
end
26+
27+
function set_metadata(obj, val)
28+
if (isempty(val))
29+
nix_mx(strcat(obj.alias, '::set_none_metadata'), obj.nix_handle, val);
30+
else
31+
obj.metadataCache = nix.Utils.add_entity(obj, val, 'nix.Section', ...
32+
strcat(obj.alias, '::set_metadata'), obj.metadataCache);
33+
end;
34+
obj.metadataCache.lastUpdate = 0;
35+
end;
36+
end;
2737

2838
end
2939

0 commit comments

Comments
 (0)