[EMAIL PROTECTED] wrote:
In a message dated 12/01/05 06:08:07 GMT Standard Time, [EMAIL PROTECTED] writes:


I have a question here.

Currently, the way directories are handled is by making a directory a somewhat special file (file type -1, IIRC).

Apart from that, though,a directory ia a simple file that can be accessed more or less like any file.

Directories contain an "entry" per file referenced in that directory.
Part of the entry is the filename of the file.
However, and that is where the original designers made a design decision we all regret today, this filename is the ENTIRE name of the file, (minus the device name).


Example: you have a file called "win1_subdir1_subdir2_subdir3_myfile"

The filename as contained in the entry in subdir3_ for this file will be:
"subdir1_subdir2_subdir3_myfile".

As you can see, we are quickly getting to the 36 chars limit since that is the most space a filename can take in the directory file entry.

Wouldn't the most simple way to get around the name length limitation be that each directory holds only the filename itself?

Of course, each name on each directory level would still be limited to 36 chars, but something like:

win1_verylongsubdirname1_verylongsubdirname2_verylongsubdirnam
e3_verylongsubdirname4_verylongsubdirname5_prettylongfilename

would be possible.
Perhaps the directory should be a new file type (-5 ot whatever) to show that this is a new type of directory.

Why not. It seems to make sense to me.


Legacy applications wouldn't work in this scheme. But, let's face it, whatever the scheme you are going to implement, they won't work (one, because the finale filemane will be too long anyway, two because they can't access new directories anyway).

We could even do better.
We have two kind of filesystem: the floppy and the harddisk.
Maintaining floppy compatibility is essential.
If we could store the EXEC information on DOS format, things would be simple, and I would push for the DOS format, not because it is DOS, but because it is so wide spread.
So far, let's keep the QL floppy format. (We could also devise a new QL5C floppy format, but only updated system could read it, so that's not so useful.)


BUT, the harddisk does not need to be exchanged with another system.
Therefore, we can do as we want on a harddisk partition.
As long as we are able to copy the harddisk file to the floppy, who care how the file is stored on the harddisk.
The filenaming issue can easily been dealed with by the user at copy time.








I had the impression that directories in QDOS were notional, not real. That is, each file, with its full name, exists on the medium whether or not a directory has been "made". Thus, if win1_op_f1 and win1_op_f2 are two files on win1_ they will immediately appear in a directory if win1_op is made a directory by

       make_dir win1_op.

The original files are totally unchanged, but a new file with type 255 (or -1) and name win1_op is added to win1. This has the effect, through software, of all files with names starting win1_op_ being treated as though they were in a directory called win1_op.

Correct. The filename is stored at the beginning of the file itself, in the first sector given by the index.
I currently assume that make_dir, when creating the directory either:
- refuse the creation if somefile already exists
- move the mapping entries from the current directory (/root directory or an already existing directory) to the new directory.


Now, the problem is that the stored information at the beginning of the file is not the filename, but the pathname (the device part being removed anyway).
That why I always think that a full pathname (device included) can be longer that 41 char: win1_+36 char = 41, but n1_dev1_+36 is already bigger!
If we could simply change the make_dir routine, as well as the name building code (you have to remember which directories you went through),
the system could very well provide an unlimited pathname (well, at worst, a 32767-char pathname... with at least a directory every 36 char)
But then we could as well force a directory separator, to ease parsing as well as other things: what about a real '/' ?
The obvious problem with / is that simple expression like win1_eort/ekr must be put inside quote to avoid floating evaluation by the basic.
SAVE "win1_eort/ekr", I can live with that!


A note for any filesystem designer: the partition size is currently limited to a, by today standard, very small size. If we could avoid to resort to big chunk, that would be very good. (give us back a 512 sector allocation unit, please!)
(What about a 32 bits indexing instead of the limited one we have today: 32 bits of 512 bytes sectors should be big enough for a single partition, that's about 4 TBytes)




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

Reply via email to