I'm working on a simple project to download all files with certain extensions. And I'm doing a search like this
public void findFile(String query){
try{
SearchV2Builder searchBuilder = client.files().searchV2Builder(query);
List<String> fileExtensions = Arrays.asList(extensions);
SearchOptions searchOptions = SearchOptions.newBuilder().withFileExtensions(fileExtensions).build();
SearchV2Result searchResult = searchBuilder.withOptions(searchOptions).start();
List<SearchMatchV2> searchMatches = searchResult.getMatches();
System.out.println(searchMatches.size());
for (SearchMatchV2 s: searchMatches){
System.out.println(s.getMetadata());
}
}
catch(DbxException e){
e.printStackTrace();
}
}
And i don't know how to write query to get all the files I tried "*" "" and none of it worked. How to wrote correct query for that?