question: public static boolean isChildOf ( Resource file , Resource dir ) { while ( file != null ) { if ( file . equals ( dir ) ) return true ; file = file . getParentResource ( ) ; } return false ; }
target:  check if file is a child of given directory