Apache Commons IO to get User Directory

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

package simplesolution.dev;

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

public class FileUtilsUserDirectoryExample {

    public static void main(String... args) {
        String userDirectoryPath = FileUtils.getUserDirectoryPath();

        File userDirectory = FileUtils.getUserDirectory();

Happy Coding 😊

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

Apache Commons IO to get Temporary Directory