public int run ( String [ ] args ) throws Exception { int exitCode = 0 ; exitCode = init ( args ) ; if ( exitCode != 0 ) { return exitCode ; } genDirStructure ( ) ; output ( new File ( outDir , DIR_STRUCTURE_FILE_NAME ) ) ; genFileStructure ( ) ; outputFiles ( new File ( outDir , FILE_STRUCTURE_FILE_NAME ) ) ; return exitCode ; }
The main function first parses the command line arguments then generates in - memory directory structure and outputs to a file last generates in - memory files and outputs them to a file .