home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / os2 / goserv.zip / gofilter.70s < prev    next >
Text File  |  1994-01-15  |  987b  |  22 lines

  1. /* Sample minimal GoServe filter program */
  2.  
  3. parse arg source, selector, selector2                   /* Get arguments */
  4. parse var source server port transaction who .           /* Often useful */
  5.  
  6. say who':' selector                             /* [show filter running] */
  7.  
  8. drive='d:'                                                 /* Data drive */
  9. dir=drive'\godata'port'\'   /* Data root directory (e.g. "d:\godata70\") */
  10.  
  11. /* This very simple filter just builds the full path name of a file from */
  12. /* the selector and returns that.  Note we do not put the full path in   */
  13. /* menus, as this could allow clients to access all files on the server  */
  14. /* machine, which is rarely desirable.                                   */
  15.  
  16. if selector='' then selector='mainmenu.'port           /* 'startup' case */
  17. if translate(right(selector,4))='.ZIP'       /* use Binary for ZIP files */
  18.   then data='Binary'
  19.   else data='Text'
  20. return 'File' data 'name' dir''selector
  21.  
  22.