@GetMapping("/search")
	public List<FileEntry> search(User user, @RequestParam String query) {
		String trimmedQuery = trimToEmpty(query);

		return fileEntryService.getAll(user)
			.stream()
			.filter(Objects::nonNull)
			.filter(fileEntry -> fileEntry.getFileType() != FileType.DIR)
			.filter(fileEntry -> containsIgnoreCase(new File(fileEntry.getPath()).getName(), trimmedQuery))
			.collect(toList());
	}
Search files on the query.

@param user  current user
@param query query string
@return list of filtered files
ngrinder-controller/src/main/java/org/ngrinder/script/controller/FileEntryApiController.java