@SuppressWarnings("JavadocReference")
	public void save(User user, FileEntry fileEntry, String encoding) {
		SVNClientManager svnClientManager = null;
		ISVNEditor editor = null;
		String checksum = null;
		InputStream bais = null;

		try {
			svnClientManager = getSVNClientManager();
			SVNRepository repo = svnClientManager.createRepository(SVNURL.fromFile(getUserRepoDirectory(user)), true);
			SVNDirEntry dirEntry = repo.info(fileEntry.getPath(), -1);

			// Add base paths
			String fullPath = "";
			// Check.. first
			for (String each : getPathFragment(fileEntry.getPath())) {
				fullPath = fullPath + "/" + each;
				SVNDirEntry folderStepEntry = repo.info(fullPath, -1);
				if (folderStepEntry != null && folderStepEntry.getKind() == SVNNodeKind.FILE) {
					throw processException("User " + user.getUserId() + " tried to create folder "
							+ fullPath + ". It's file..");
				}
			}

			editor = repo.getCommitEditor(fileEntry.getDescription(), null, true, null);
			editor.openRoot(-1);
			fullPath = "";
			for (String each : getPathFragment(fileEntry.getPath())) {
				fullPath = fullPath + "/" + each;
				try {
					editor.addDir(fullPath, null, -1);
				} catch (Exception e) {
					// FALL THROUGH
					noOp();
				}
			}

			if (fileEntry.getFileType() == FileType.DIR) {
				editor.addDir(fileEntry.getPath(), null, -1);
			} else {
				if (dirEntry == null) {
					// If it's new file
					editor.addFile(fileEntry.getPath(), null, -1);
				} else {
					// If it's modification
					editor.openFile(fileEntry.getPath(), -1);
				}
				editor.applyTextDelta(fileEntry.getPath(), null);

				// Calc diff
				final SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();

				if (fileEntry.getContentBytes() == null && fileEntry.getFileType().isEditable()) {
					bais = new ByteArrayInputStream(checkNotNull(fileEntry.getContent()).getBytes(
						encoding == null ? "UTF-8" : encoding));
				} else {
					bais = new ByteArrayInputStream(fileEntry.getContentBytes());
				}
				checksum = deltaGenerator.sendDelta(fileEntry.getPath(), bais, editor, true);
			}

			addPropertyValue(editor, fileEntry);
			editor.closeFile(fileEntry.getPath(), checksum);
		} catch (Exception e) {
			abortSVNEditorQuietly(editor);
			// If it's adding the folder which already exists... ignore..
			if (e instanceof SVNException && fileEntry.getFileType() == FileType.DIR) {
				if (SVNErrorCode.FS_ALREADY_EXISTS.equals(((SVNException) e).getErrorMessage().getErrorCode())) {
					return;
				}
			}
			LOG.error("Error while saving file to SVN", e);
			throw processException("Error while saving file to SVN", e);
		} finally {
			closeSVNEditorQuietly(editor);
			closeSVNClientManagerQuietly(svnClientManager);
			IOUtils.closeQuietly(bais);
		}
	}
Save fileEntry on the {@link FileEntry.getPath()} location.

@param user      the user
@param fileEntry fileEntry to be saved
@param encoding  file encoding with which fileEntry is saved. It is meaningful
                 only FileEntry is editable.
ngrinder-controller/src/main/java/org/ngrinder/script/repository/FileEntryRepository.java