[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help! Filetype $00 problems . . .



David Miller <xjustdavex@glis.net> wrote:

:> : There is a tech note about this.  ProDOS can't use up vast quantities
:> : of memory, as some OSes do.  Renaming a forked file shouldn't require
:> : much extra code, but if you can rename it, why not read it, write it,
:> : and create it, all of which *would* require extra code.  Not allowing
:> : renaming is absolutely stupid, though.  Consistent, but stupid.
:> 
:> Huh? If anything disallowing renaming extended files would take more code
:> than allowing it. There is nothing about the filename field in a directory
:> entry that's different from any other file. They had to put code in to check
:> the storage type and disallow renaming an extended file while allowing
:> it would mean simply doing the rename as with any other file.

: But they didn't add any extra code.  That code has been there since the
: beginning.  Basically, it refuses to perform any operations on any file
: with a storage type it doesn't recognize.  It was never told how to
: recognize storage type 5 (extended files) so therefore, it won't do
: anything with it.  How is ProDOS supposed to know that the filename is
: stored the same way?  They could have defined a storage type that
: defines the directory entry differently (not likely, but possible
: nonetheless).  Safer to just ignore anything with an unknown storage
: type.

Every filename, from volume name to directory name to standard file name to
extended file name, is a Pascal string. That is, it's a character string 
preceded by a length byte. There necessarily is code to disallow renaming an 
extended file. If it didn't check, it wouldn't know the file is extended. It
does check and returns an unsupported STORAGE_TYPE error.

Apple took away the ability to change the directory structure by reusing
the VERSION and MIN_VERSION fields in directory entries to allow for
lowercase chars in filenames. If they were to change the way filenames
are stored in a directory, they would have used these fields to keep
older versions from reading and misinterpreting the entries.

There are many operations which can't be done on a volume, but it is possible
to rename a volume. There is no excuse for not being able to rename an 
extended file. I bet if someone wanted to go to the trouble, they could
come up with a patch to make it possible.
-- 
Offsite mail to this host gets nuked.