class MoveFile extends AbstractToOperation<MoveFile> {

    @Override
    protected TOExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) {
        File fileFrom = getAbsoluteFile(transformedAppFolder, transformationContext);
        File fileTo = getFileTo(transformedAppFolder, transformationContext);
        TOExecutionResult result;

        // TODO
        // Check if it is really a file and if it exists!

        try {
            if (fileFrom.isDirectory()) {
                IOException ex = new IOException(getRelativePath(transformedAppFolder, fileFrom) + " (Is a directory)");
                result = TOExecutionResult.error(this, new TransformationOperationException("File could not be moved", ex));
            } else {
                String details = String.format("File '%s' has been moved to '%s'", getRelativePath(), getRelativePath(transformedAppFolder, fileTo));
                FileUtils.copyFileToDirectory(fileFrom, fileTo);
                FileUtils.fileDelete(fileFrom.getAbsolutePath());
                result = TOExecutionResult.success(this, details);
            }
        } catch (IOException e) {
            result = TOExecutionResult.error(this, new TransformationOperationException("File could not be moved", e));
        }

        return result;
    }

    public  MoveFile();

}