protected int interpretLs ( LineParser lp , MessageMgr mm ) { String directory = lp . getArgs ( ) ; IOFileFilter fileFilter = new WildcardFileFilter ( new String [ ] { "*.ssc" } ) ; DirectoryLoader dl = new CommonsDirectoryWalker ( directory , DirectoryFileFilter . INSTANCE , fileFilter ) ; if ( dl . getLoadErrors ( ) . hasErrors ( ) ) { mm . report ( dl . getLoadErrors ( ) ) ; return 1 ; } FileSourceList fsl = dl . load ( ) ; if ( dl . getLoadErrors ( ) . hasErrors ( ) ) { mm . report ( dl . getLoadErrors ( ) ) ; return 1 ; } for ( FileSource fs : fsl . getSource ( ) ) { //TODO need to adapt to new source return mm . report ( MessageMgr . createInfoMessage ( "script file - dir <{}> file <{}>" , directory , fs . getBaseFileName ( ) ) ) ; } return 0 ; }
Interprets the actual ls command