Package net.util

Examples of net.util.FolderPath


                jFileChooser.setMultiSelectionEnabled(true);
                jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

                if (jFileChooser.showOpenDialog(jFileChooser) == JFileChooser.APPROVE_OPTION) {
                    String p = jFileChooser.getSelectedFile().getPath();
                    FolderPath fPath = new FolderPath(p);
                    StringBuilder path = new StringBuilder(p).append("|");

                    for (File f : fPath.getFolders()) {
                        path.append(f.getPath()).append("|");
                    }

                    // 记录文件总的大小
                    long total = 0;
                    FileInputStream fis;
                    try {
                        for (File f : fPath.getFiles()) {
                            path.append(f.getPath()).append("*");
                            fis = new FileInputStream(f.getPath());
                            total += fis.available();
                        }
                    } catch (IOException ex) {
View Full Code Here

TOP

Related Classes of net.util.FolderPath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.