Page 3 of 3

Re: DATA_USE

Posted: Thu Feb 07, 2019 7:17 pm
by Andrew
Thank you Marcel and pjw !
The FTEST /FTYP solution was already used by my program, but I never thought about using FNAME$ !

Re: DATA_USE

Posted: Thu Feb 07, 2019 11:04 pm
by mk79
pjw wrote:Surely, this must be considered the normal - and expected - behaviour?
In a sane world requesting to open a directory with a sub-name that doesn't exist should return err.fdnf and not the parent directory. I'm not even sure if this behavior was deliberate in the first place or an accident. But this was a use-case that I have not regarded for the DOS device.
Arguably, FNAME$ should really only return the actual name of the file, sans the directory, but oh well.
The basic problem with all that has to do with directories on the QL is of course that the filename always contains the directory. This time by design, maybe because the ROM part of the OS was too limiting to do anything else, but all our problems originate from this fact. I obviously like the QL a lot, but everything that has to do with directories is shit.
Qdos and co havent exactly provided us with any easy solutions to parsing file names or reading directories (yes, I know: Qdos & co device drivers).
I think this absolute should be the job of the OS and not the drivers, at least the parsing part. 15 years ago or so I proposed to introduce new traps to make directory handling sane, but that would break QDOS compatibility etc. yada yada, so it went nowhere.

Marcel