Hmm, but the TK2 Manual states about OPEN_DIR, so, apart from Level 2, it should be possible. But what kind of directory, if not Level 2? Perhaps just the root one.

Section 10  Open and Close

  The standard QL channel OPEN commands are redefined by Toolkit II
  to use the data directory. In addition, Toolkit II provides a set
  of functions for opening files either using a specified channel
  number (as in the standard QL commands), or they will find and
  return a vacant channel number. The functions also allow filing
  system errors to be intercepted and processed by SuperBASIC
  programs.

  Commands

    OPEN #channel, name                open a file for read/write
    OPEN_IN #channel, name             open a file for input only
    OPEN_NEW #channel, name            open a new file
    OPEN_OVER #channel, name           open a new file, if it
                                         exists it is overwritten
    OPEN_DIR #channel, name            open a directory

    CLOSE #channels                    close channels


The problem is related to the FTEST command trying to open a file rather than a directory to verify its existance. In SMSQ/E a directory can be opened as a file, but in QDOS I don't think it can. The correct way to check for the validity of devices and directories would be to attempt to open a directory, not a file (TRAP#2 with D0=1 and D3=4 rather than D3=1).

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to