Apache Commons IO to get Temporary Directory

Java Code Examples for using getTempDirectoryPath() and getTempDirectory() methods of org.apache.commons.io.FileUtils class

package simplesolution.dev;

import org.apache.commons.io.FileUtils;
import java.io.File;

public class FileUtilsTempDirectoryExample {

    public static void main(String... args) {
        String tempDirectoryPath = FileUtils.getTempDirectoryPath();

        File tempDirectory = FileUtils.getTempDirectory();

Happy Coding 😊

Apache Commons IO to get Readable File Size in KB MB GB TB

Apache Commons IO to get User Directory