<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    zhyiwww
    用平實的筆,記錄編程路上的點點滴滴………
    posts - 536,comments - 394,trackbacks - 0

    This example lists the files and subdirectories in a directory. To list all descendant files and subdirectories under a directory, see e33 Traversing the Files and Directories Under a Directory .

    				
    						File dir = new File("directoryName");
        
        String[] children = dir.list();
        if (children == null) {
            // Either dir does not exist or is not a directory
        } else {
            for (int i=0; i<children.length; i++) {
                // Get filename of file or directory
                String filename = children[i];
            }
        }
        
        // It is also possible to filter the list of returned files.
        // This example does not return any files that start with `.'.
        FilenameFilter filter = new FilenameFilter() {
            public boolean accept(File dir, String name) {
                return !name.startsWith(".");
            }
        };
        children = dir.list(filter);
        
        
        // The list of files can also be retrieved as File objects
        File[] files = dir.listFiles();
        
        // This filter only returns directories
        FileFilter fileFilter = new FileFilter() {
            public boolean accept(File file) {
                return file.isDirectory();
            }
        };
        files = dir.listFiles(fileFilter);
    				
    		


    |----------------------------------------------------------------------------------------|
                               版權(quán)聲明  版權(quán)所有 @zhyiwww
                引用請注明來源 http://m.tkk7.com/zhyiwww   
    |----------------------------------------------------------------------------------------|
    posted on 2006-06-13 11:45 zhyiwww 閱讀(296) 評論(0)  編輯  收藏 所屬分類: code demo -java
    主站蜘蛛池模板: 你好老叔电影观看免费| 18勿入网站免费永久| 亚洲综合久久成人69| 午夜免费福利影院| 在线观看免费播放av片| 久久夜色精品国产噜噜亚洲a| 亚洲国产专区一区| 91手机看片国产永久免费| AV激情亚洲男人的天堂国语| 婷婷亚洲久悠悠色悠在线播放| 91免费资源网站入口| 精品国产福利尤物免费| 亚洲日本va一区二区三区| 亚洲av无码一区二区三区不卡| 成年女人毛片免费播放人| AAA日本高清在线播放免费观看| 在线a亚洲老鸭窝天堂av高清| 亚洲中文字幕在线观看| 亚洲精品动漫免费二区| 日本高清免费观看| 色www免费视频| 国产精品亚洲精品| 无码乱人伦一区二区亚洲一| 国产乱弄免费视频| 在线看片免费不卡人成视频| 成人久久免费网站| 一区二区免费在线观看| 亚洲欧美日韩综合俺去了| 亚洲欧洲精品久久| 国产亚洲婷婷香蕉久久精品| 国产做床爱无遮挡免费视频| 午夜国产精品免费观看| 免费A级毛片av无码| a级毛片在线视频免费观看| 亚洲av日韩av永久在线观看| 亚洲成年人免费网站| 亚洲精品免费在线观看| 久久久久久亚洲精品不卡| 亚洲av片一区二区三区| 无码视频免费一区二三区| 国产成人精品免费视频大|