SYS.INODE get file inode
function [i, cmd] = inode(file)
i = [];
if ispc()
cmd = sprintf('fsutil file queryfileid "%s"', file);
elseif ismac()
cmd = sprintf('stat -f %%i "%s"', file);
else
cmd = sprintf('stat -c %%i "%s"', file);
end
[s, m] = system(cmd);
if s == 0
if ispc()
m = strrep(strip(m), "File ID is ", "");
i = sscanf(m, '%lx', 1);
if i == intmax('uint64')
L = strlength(m);
i = [sscanf(m(1:L-1), '%lx', 1), sscanf(m(L:end), '%lx', 1)];
end
else
i = str2double(m);
end
end
i = uint64(i);
end