java.lang.Object
com.ibm.jzos.sample.nonvsam.directory.ListDirectory
This sample demonstrates how to list the contents of a directory in two different
ways. One approach lists all of the objects in the directory and the other
approach lists only the sub-directories. The directory name is
given as an argument to main, and it may be either a HFS directory or a PDS directory.
- Since:
- 2.4.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlistSubdirectories(String dirName) Lists only the sub-directories.static voidThe main method accepts a directory name as the only argument and calls bothlistAll(String)andlistSubdirectories(String)to list the directory contents.
-
Constructor Details
-
ListDirectory
public ListDirectory()
-
-
Method Details
-
main
The main method accepts a directory name as the only argument and calls bothlistAll(String)andlistSubdirectories(String)to list the directory contents.- Parameters:
args- The name of the directory to list
-
listSubdirectories
Lists only the sub-directories.- Parameters:
dirName- The name of the directory to list
-