private String getCommonRootDir ( String filePath , HashMap validFilePaths ) { for ( Iterator it = validFilePaths . entrySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { Map . Entry entry = ( Map . Entry ) it . next ( ) ; String path = ( String ) ( ( entry ) . getKey ( ) ) ; if ( filePath . startsWith ( path ) ) return ( String ) entry . getValue ( ) ; } return null ; }
Retrieves the directory in common between the specified path and the archive root directory . If the file path cannot be found among the valid paths then null is returned .