static Resource getFile ( Resource rootDir , String strDir , String defaultDir , Resource configDir , short type , ConfigImpl config ) { strDir = replacePlaceholder ( strDir , config ) ; if ( ! StringUtil . isEmpty ( strDir , true ) ) { Resource res ; if ( strDir . indexOf ( "://" ) != - 1 ) { // TODO better impl. res = getFile ( config . getResource ( strDir ) , type ) ; if ( res != null ) return res ; } res = rootDir == null ? null : getFile ( rootDir . getRealResource ( strDir ) , type ) ; if ( res != null ) return res ; res = getFile ( config . getResource ( strDir ) , type ) ; if ( res != null ) return res ; } if ( defaultDir == null ) return null ; Resource file = getFile ( configDir . getRealResource ( defaultDir ) , type ) ; return file ; }
generate a file object by the string definition