question: public boolean delete ( File f ) { if ( f . isDirectory ( ) ) { for ( File child : f . listFiles ( ) ) { if ( ! delete ( child ) ) { return ( false ) ; } } } boolean result = f . delete ( ) ; MediaScannerConnection . scanFile ( this , new String [ ] { f . getAbsolutePath ( ) } , null , null ) ; return ( result ) ; }
target:  Recursively deletes a directory and its contents.