Here you can find the source of getFiles(String directoryPath)
Parameter | Description |
---|---|
directoryPath | a parameter |
public static String[] getFiles(String directoryPath)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { /**// ww w . j a v a 2 s. co m * Return list of files in given directory * * @param directoryPath * @return */ public static String[] getFiles(String directoryPath) { File dir = new File(directoryPath); if (dir.exists()) { return dir.list(); } return null; } }