DATA_USE

Anything QL Software or Programming Related.
User avatar
Andrew
Aurora
Posts: 793
Joined: Tue Jul 17, 2018 9:10 pm

Re: DATA_USE

Post by Andrew »

Thank you Marcel and pjw !
The FTEST /FTYP solution was already used by my program, but I never thought about using FNAME$ !


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: DATA_USE

Post 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


Post Reply