@PostMapping(value = "/new/**", params = "type=folder")
	public void addFolder(User user,
							@RemainedPath String path,
							@RequestBody String folderName) {
		fileEntryService.addFolder(user, path, trimToEmpty(folderName), "");
	}
", params = "type=script")
	public Map<String, Object> createScript(User user,
											@RemainedPath String path,
											@RequestBody ScriptCreationParams scriptCreationParams) {
		String fileName = scriptCreationParams.getFileName();
		String testUrl = scriptCreationParams.getTestUrl();
		String options = scriptCreationParams.getOptions();
		boolean createLibAndResource = scriptCreationParams.isCreateLibAndResource();

		fileName = trimToEmpty(fileName);
		String name = "Test1";
		if (isEmpty(testUrl)) {
			testUrl = defaultIfBlank(testUrl, "http://please_modify_this.com");
		} else {
			name = UrlUtils.getHost(testUrl);
		}
		ScriptHandler scriptHandler = fileEntryService.getScriptHandler(scriptCreationParams.getScriptType());
		FileEntry entry;
		if (scriptHandler instanceof ProjectHandler) {
			path += isEmpty(path) ? "" : "/";

			if (!fileEntryService.hasFileEntry(user, PathUtils.join(path, fileName))) {
				fileEntryService.prepareNewEntry(user, path, fileName, name, testUrl, scriptHandler, createLibAndResource, options);
				return buildMap(
					"message", fileName + " project is created.",
					"path", "/script/list/" + encodePathWithUTF8(path) + fileName);
			} else {
				return buildMap(
					"message", fileName + " is already existing. Please choose the different name",
					"path", "/script/list/" + encodePathWithUTF8(path));
			}

		} else {
			String fullPath = PathUtils.join(path, fileName);
			if (fileEntryService.hasFileEntry(user, fullPath)) {
				entry = fileEntryService.getOne(user, fullPath);
			} else {
				entry = fileEntryService.prepareNewEntry(user, path, fileName, name, testUrl, scriptHandler, createLibAndResource, options);
			}
		}

		save(user, new FileSaveParams(entry, null, "0", createLibAndResource));

		return buildMap("file", entry);
	}

	/**
Add a folder on the given path.

@param user       current user
@param path       path in which folder will be added
@param folderName folderName
ngrinder-controller/src/main/java/org/ngrinder/script/controller/FileEntryApiController.java