Here you can find the source of getTempDirWithFileSeparatorSuffix()
public static String getTempDirWithFileSeparatorSuffix()
//package com.java2s; /******************************************************************************* * Copyright (c) 2012 pf_miles./*from w w w. j a va2 s .c om*/ * 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 * * Contributors: * pf_miles - initial API and implementation ******************************************************************************/ import java.io.File; public class Main { /** * Get the platform dependent temporary directory path, with 'file * separator' suffix('/' on linux platform, '\' on windows). * * @return */ public static String getTempDirWithFileSeparatorSuffix() { String p = System.getProperty("java.io.tmpdir"); if (p.endsWith(File.separator)) return p; return p + File.separator; } }