question: public String [ ] readDirectory ( String dir ) { if ( dir == null ) { throw new NullPointerException ( "dir" ) ; } StringArrayOut listOut = new StringArrayOut ( ) ; try { checkResult ( LibIMobileDevice . afc_read_directory ( getRef ( ) , dir , listOut ) ) ; StringArray list = listOut . getValue ( ) ; ArrayList < String > result = new ArrayList < String > ( ) ; if ( list != null ) { for ( int i = 0 ; ; i ++ ) { String s = list . get ( i ) ; if ( s == null ) { break ; } result . add ( s ) ; } } return result . toArray ( new String [ result . size ( ) ] ) ; } finally { LibIMobileDevice . delete_StringArray_values_z ( listOut . getValue ( ) ) ; listOut . delete ( ) ; } }
target:  Returns a directory listing of the specified directory.