Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* ************************************************************************
 #
 #  DivConq
 #
 #  http://divconq.com/
 #
 #  Copyright:
 #    Copyright 2014 eTimeline, LLC. All rights reserved.
 #
#  License:
#    See the license.txt file in the project's top-level directory for details.
#  Authors:
#    * Andy White
************************************************************************ */
package divconq.script.inst.file;
public class TempFolder extends With {
	public void prepTarget(StackEntry stack) {
        String name = stack.stringFromSource("Name");
        
        if (StringUtil.isEmpty(name))
        	name = "TempFolder_" + stack.getActivity().tempVarName();
        
        String vname = name;
        
        Path path = FileUtil.allocateTempFolder2();
        FileSystemDriver drv = new FileSystemDriver(path);
        FileSystemFile fh = new FileSystemFile(drv.true);
        
        drv.isTemp(true);
        
        stack.addVariable("TempFS_" + stack.getActivity().tempVarName(), drv);
        stack.addVariable(vnamefh);
        this.setTarget(stackfh);
		this.nextOpResume(stack);
	}
New to GrepCode? Check out our FAQ X