- java.lang.Object
-
- com.ibm.jzos.sample.nonvsam.directory.ListDirectory
-
public class ListDirectory extends java.lang.ObjectThis 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:
PdsDirectory
-
-
Constructor Summary
Constructors Constructor Description ListDirectory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidlistSubdirectories(java.lang.String dirName)Lists only the sub-directories.static voidmain(java.lang.String[] args)The main method accepts a directory name as the only argument and calls bothlistAll(String)andlistSubdirectories(String)to list the directory contents.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
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
public static void listSubdirectories(java.lang.String dirName)
Lists only the sub-directories.- Parameters:
dirName- The name of the directory to list
-
-