Hi!

The last very important thing I need for ZXVGS is the model of
listing directory of disk at program level. I would like to take
advice before I made my mind. The list of files will be mostly
used in file selectors. I know some models now {comments}:

1. Used in AmigaOS:
 lk=Lock (mask,mode)  {to prevent from changes in multitasking}
 Examine (lk,block)   {for first entry; gives 260 bytes per file}
 ExNext (lk,block)    {for next entries; repeated till the error}
 UnLock (lk)          {release handle}

 - gives 107B filename, 80B comment, flags, size, date, type
 - the buffer is quite big

2. Used in MesS-DOS:
 Int 21h(#4E,mask,flags) {1st; puts information into a buffer}
 Int 21h(#4F)            {for next entries; until error}

 - no handle for directory
 - gives date, size, flags
 - the OS don't know what program will do then
 - buffer is shorter
 - limited filename length
 - unknown number of entries

3. Used in MasterDOS:
 a$=DIR$(mask$)
 x=FSTAT(a$(10*n+1 TO 10*n+10),k)    {for more info about file}

 - a$ can be big
 - gives only set of filenames (all at once)
 - fixed filename length
 - separate function for more info

4. Used in PLUS3DOS:
 n=DOS CATALOG (flags,buffer,mask)  {call until get n<bufsize}

 - gives some filenames at once
 - limited filename length
 - fills buffer with filenames and some info

5. Used in TR-DOS:
 OPEN #n,"parser"         {kind of trick}
 TR-DOS function 7 (n)    {sends directory to stream}
 CLOSE #n

 - the directory list is generated by OS as plain text
 - some info as plain text
 - ready to fill requester window (requires buffer)

6. Used in C64:
 LOAD "$",8        {phantom file}

 - dedicated filename for list of files (special format)
 - some info as plain text
 - random access to list
 - ready to fill requester window (without buffer)

7. Also possible:
 Open "." (or "DISK:directory/") file and parse it.

 - as above, but there's no reserved filename
 - length etc. can be as binary
 - random access to list




Which one you find the best?

What informations should be added to filename?


Please note that operarating system has probably better
circumstances to sort files and the program will have limited
space for buffers. Also sometimes there can be a lot of files in
one directory and length of filename isn't limited (especially
on "FTP:name.of.server/" disks).

My wishes:
 - let the system count files - will be faster;
 - random access to list of files - allows scroll back the file
selector window without buffers;
 - the same way to list devices - for "*:" as mask;
 - let the system sort files and put directories at beginning.



To get more informations about ZXVGS read the file "ZXVGS.guide"
from "http://nautilus.torch.net.pl/zxland/ZXVGSdoc.lha";.

--
Yarek.


Reply via email to