@GetMapping("/detail/**")
	public Map<String, Object> getOne(User user,
									  @RemainedPath String path,
									  @RequestParam(value = "r", required = false) Long revision) {
		FileEntry script = fileEntryService.getOne(user, path, revision);
		if (script == null || !script.getFileType().isEditable()) {
			LOG.error("Error while getting file detail on {}. the file does not exist or not editable", path);
			return emptyMap();
		}

		ScriptHandler scriptHandler = fileEntryService.getScriptHandler(script);
		String codemirrorKey = scriptHandler.getCodemirrorKey();
		if (scriptHandler instanceof NullScriptHandler) {
			codemirrorKey = ((NullScriptHandler) scriptHandler).getCodemirrorKey(script.getFileType());
		}

		return buildMap(
			"file", script,
			"scriptHandler", scriptHandler,
			"codemirrorKey", codemirrorKey
		);
	}
", params = "type=folder")
	public void addFolder(User user,
							@RemainedPath String path,
							@RequestBody String folderName) {
		fileEntryService.addFolder(user, path, trimToEmpty(folderName), "");
	}

	/**
Get the details of given path.

@param user     user
@param path     user
@param revision revision. -1 if HEAD
@return detail view properties
ngrinder-controller/src/main/java/org/ngrinder/script/controller/FileEntryApiController.java