@GetMapping("/resource")
	public Map<String, Object> getResources(User user, @RequestParam String scriptPath, @RequestParam(required = false) String ownerId) {
		if (user.getRole() == Role.ADMIN && StringUtils.isNotBlank(ownerId)) {
			user = userService.getOne(ownerId);
		}
		FileEntry fileEntry = fileEntryService.getOne(user, scriptPath);
		String targetHosts = "";
		List<String> fileStringList = newArrayList();
		if (fileEntry != null) {
			List<FileEntry> fileList = fileEntryService.getScriptHandler(fileEntry).getLibAndResourceEntries(user, fileEntry, -1L);
			for (FileEntry each : fileList) {
				fileStringList.add(each.getPath());
			}
			targetHosts = filterHostString(fileEntry.getProperties().get("targetHosts"));
		}

		return buildMap("targetHosts", trimToEmpty(targetHosts), "resources", fileStringList);
	}
Get resources and lib file list from the same folder with the given script path.

@param user       user
@param scriptPath script path
@param ownerId    ownerId
@return json string representing resources and libs.
ngrinder-controller/src/main/java/org/ngrinder/perftest/controller/PerfTestApiController.java