File function ( Resource arg0 ) { if ( arg0 == null ) { return null ; } switch ( arg0 . getType ( ) ) { case DIRECTORY : return arg0 . dir ( ) ; case RESOURCE : return arg0 . file ( ) ; default : return null ; } }
checks resource #gettype and returns existing file or dir as appropriate , or null for resource.type #undefined . this approach is a reproduction of geoserverresourceloader find logic . concode_field_sep PlaceHolder placeHolder concode_field_sep List<Resource> search concode_elem_sep File file concode_elem_sep File file concode_elem_sep boolean exists concode_elem_sep File createNewDirectory concode_elem_sep void copy concode_elem_sep void copy concode_elem_sep void copy concode_elem_sep void copy concode_elem_sep boolean renameByCopy concode_elem_sep File createNewFile concode_elem_sep File directory concode_elem_sep File directory