Java Temp Directory Get getTempDir(Object fileID, String fileName)

Here you can find the source of getTempDir(Object fileID, String fileName)

Description

get email attachment temp store dir

License

Open Source License

Parameter

Parameter Description
fileID a parameter
fileName a parameter

Declaration

public static String getTempDir(Object fileID, String fileName) 

Method Source Code

//package com.java2s;
/**//from w w w .j  av  a2  s  .c o  m
 * @className
 * 
 * Copyright (c) 2012, Original and/or its affiliates. All rights reserved.
 * ORIGINAL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.io.File;

public class Main {
    public static final String TEMP_DIR = System.getProperty("java.io.tmpdir");

    /**
     * get email attachment temp store dir
     * 
     * @param fileID
     * @param fileName
     * @return
     */
    public static String getTempDir(Object fileID, String fileName) {
        // int suffix = fileName.lastIndexOf(".");

        // return new File(TEMP_DIR, fileID
        // + (suffix == -1 ? "" :
        // fileName.substring(suffix))).toURI().toString();
        return new File(TEMP_DIR, fileName).toURI().toString();
    }
}

Related

  1. getTempDir()
  2. getTempDir()
  3. getTempDir()
  4. getTempDir(File baseDir)
  5. getTempDir(final String directory, final String prefix, boolean autodelete)
  6. getTempDir(String desc)
  7. getTempDir(String name, String prefix, File parentDir)
  8. getTempDir(String path)
  9. getTempDir(String prefix)