The following code 'll return the list of files that are present in the directory.This function accepts a parameter 'dirName',the directory in which you want the list of files.
- try {
- if (dir.isDirectory()) {
- files = dir.list();
- }
- else if (!dir.exists()){
- }
- e.printStackTrace();
- }
- return files;
- }
No comments:
Post a Comment