@Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { try { final String fileid = this.fileid.getFileid(file, new DisabledListProgressListener()); final Map<String, String> properties = session.getClient().files().get(fileid).setFields("properties") .setSupportsTeamDrives(PreferencesFactory.get().getBoolean("googledrive.teamdrive.enable")).execute().getProperties(); if(null == properties) { return Collections.emptyMap(); } return properties; } catch(IOException e) { throw new DriveExceptionMappingService().map("Failure to read attributes of {0}", e, file); } }
final File reference = session.getClient().files().get(id) .setFields("parents") .setSupportsTeamDrives(PreferencesFactory.get().getBoolean("googledrive.teamdrive.enable")) .execute(); for(String parent : reference.getParents()) {