// -----BEGIN DISCLAIMER-----
/*******************************************************************************
 * Copyright (c) 2011, 2020 JCrypTool Team and Contributors
 * 
 * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
 * Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
// -----END DISCLAIMER-----
package org.jcryptool.core.util.directories;

import org.eclipse.core.resources.ResourcesPlugin;

/**
 * Utility class for all directory services used in JCrypTool. Plug-ins should use this class for all directory purposes
 * rather than determining a path themselves.
 * 
 * @author Dominik Schadow
 * @version 0.9.5
 */
public class DirectoryService {
    private static final String TEMP_DIR = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$
    private static String userHome = System.getProperty("user.home"); //$NON-NLS-1$
    private static final String WORKSPACE_DIR = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();

    /**
     * Returns the system temp directory.
     * 
     * @return The complete path to the temp directory
     */
    public static String getTempDir() {
        return TEMP_DIR;
    }

    /**
     * Returns the users home directory.
     * 
     * @return The complete path to the user home directory
     */
    public static String getUserHomeDir() {
        return userHome;
    }

    public static void setUserHomeDir(String userHome) {
        DirectoryService.userHome = userHome;
    }

    /**
     * Returns the configured workspace directory (normally <i>user.home/Documents/.jcryptool</i>).
     * 
     * @return The complete path to the configured workspace
     */
    public static String getWorkspaceDir() {
        return WORKSPACE_DIR;
    }
}

@@ -567,16 +567,38 @@
 ories;%0A%0A
+import java.io.File;%0A%0A
 import o
@@ -640,16 +640,16 @@
 Plugin;%0A
-
 %0A/**%0A * 
@@ -901,103 +901,8 @@
 e %7B%0A
-    private static final String TEMP_DIR = System.getProperty(%22java.io.tmpdir%22); //$NON-NLS-1$%0A
     
@@ -1270,23 +1270,169 @@
     
-return TEMP_DIR
+String string = getWorkspaceDir() + %22/%22 + %22temp_data%22;%0A        File file = new File(string);%0A        if (! file.exists()) %7B%0A%09%09%09file.mkdirs();%0A%09%09%7D%0A%09%09return string
 ;%0A  

Change temporary folder to reside in {workspace}/tmp b/c of reasons