java输出一个目录下的子目录

java输出一个目录下的子目录

package com.vfsd.core;

import java.io.File;

public class ListDir {
    
    public static void main(String[] args)
    {
        File dir1 = new File("K:\\Qt\\Qt5.9.6\\5.9.6\\msvc2015_64\\include");
        listDir1(dir1);
    }
    
    public static void listDir1(File dirParam)
    {
        File[] files1 = dirParam.listFiles();
        for(int k=0;k<files1.length;k++)
        {
            File fileIndex = files1[k];
            if(fileIndex.isDirectory())
            {
                System.out.println(fileIndex.getPath());
            }
        }
    }

}

K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\ActiveQt
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DAnimation
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DCore
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DExtras
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DInput
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DLogic
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DQuick
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DQuickAnimation
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DQuickExtras
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DQuickInput
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DQuickRender
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DQuickScene2D
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\Qt3DRender
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtAccessibilitySupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtANGLE
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtBluetooth
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtCharts
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtConcurrent
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtCore
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtDataVisualization
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtDBus
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtDesigner
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtDesignerComponents
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtDeviceDiscoverySupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtEglSupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtEventDispatcherSupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtFbSupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtFontDatabaseSupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtGamepad
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtGui
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtHelp
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtLocation
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtMultimedia
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtMultimediaQuick_p
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtMultimediaWidgets
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtNetwork
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtNetworkAuth
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtNfc
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtOpenGL
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtOpenGLExtensions
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtPacketProtocol
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtPlatformCompositorSupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtPlatformHeaders
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtPositioning
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtPrintSupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtPurchasing
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQml
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQmlDebug
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQuick
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQuickControls2
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQuickParticles
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQuickTemplates2
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQuickTest
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtQuickWidgets
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtRemoteObjects
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtRepParser
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtScript
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtScriptTools
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtScxml
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtSensors
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtSerialBus
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtSerialPort
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtSql
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtSvg
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtTest
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtTextToSpeech
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtThemeSupport
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtUiPlugin
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtUiTools
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWebChannel
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWebEngine
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWebEngineCore
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWebEngineWidgets
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWebSockets
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWebView
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWidgets
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtWinExtras
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtXml
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtXmlPatterns
K:\Qt\Qt5.9.6\5.9.6\msvc2015_64\include\QtZlib

 

posted @ 2019-10-20 16:25  西北逍遥  阅读(580)  评论(0编辑  收藏  举报