@SuppressWarnings("unchecked")
    @Override
    public Object get(File file, String attribute) {
        return switch (attribute) {
            case "uid" -> {
                var user = (UserPrincipal) file.getAttribute("owner", "owner");
                yield getUniqueId(user);
            }
            case "gid" -> {
                var group = (GroupPrincipal) file.getAttribute("posix", "group");
                yield getUniqueId(group);
            }
            case "mode" -> {
                var permissions = (Set<PosixFilePermission>) file.getAttribute("posix", "permissions");
                yield toMode(permissions);
            }
            case "ctime" -> file.getCreationTime();
            case "rdev" -> 0L;
            case "dev" -> 1L;
            case "ino" -> file.id();
            case "nlink" -> file.links();
            default -> null;
        };
    }
Same as {@code com.google.common.jimfs.UnixAttributeProvider} except that getUniqueId() will return user
if user is a numerical string.
testutil/src/main/java/com/yahoo/vespa/test/file/UnixUidGidAttributeProvider.java