Java Temp File Create getTempFile(String tmpdir)

Here you can find the source of getTempFile(String tmpdir)

Description

get Temp File

License

Open Source License

Declaration

public static synchronized File getTempFile(String tmpdir) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    static long counter = 1L;

    public static synchronized File getTempFile(String tmpdir) {
        String name = String
                .valueOf(System.currentTimeMillis() + ++counter);
        return new File(tmpdir, name);
    }/*from w w  w  . j  a v a  2 s . c  om*/
}

Related

  1. getTempFile(String config)
  2. getTempFile(String extension)
  3. getTempFile(String fileId)
  4. getTempFile(String filePrefix, boolean deleteOnExit)
  5. getTempFile(String name)
  6. getTempFileDir()
  7. getTempFileFor(File file)
  8. getTempFileGivenName(File file)
  9. getTempFileName()