code: protected boolean existsFile(I_CmsDialogContext context) {
  
          CmsResource res = context.getResources().get(0);
          String sitePath = CmsVfsService.prepareFileNameForEditor(context.getCms(), res, getFileParam());
          return context.getCms().existsResource(sitePath, CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
      }
docs: Checks whether the file specified by the file param and the given context exists and is visible.<p>
  
  @param context the dialog context
  
  @return <code>true</code> in case the file exists and is visible