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

Re: Help! Filetype $00 problems . . .



On Tue, 27 Apr 1999 23:07:42 GMT, Randy Shackelford
<shack@onyx.southwind.net> wrote:

>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.

The file name is not quite a Pascal string. The storage type and
filename length are stored in the same byte.  That is why filenames
are limited to 15 characters.  You can only have a length nibble of
$0-$F (0-15).

ProDOS was created long before extended files were even considered.
I'm sure one of the safety features in ProDOS is to not allow any
access to storage types it does not understand.  If this is true then
the code to disallow any access to extended files has been around
since day one, before extended files even existed which means that
they didn't ADD code to disallow renaming them.  This is what Dave was
getting at.

>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.

Yes, someone could patch ProDOS to allow it but it is my opinion that
it is best left the way it is.  If you can't rename it then you
automatically know that you can't copy it or delete it either.  In
effect, you know it is an extended file.  Don't forget that ProDOS
doesn't indicate an extended file in any way in a directory listing.

It would probably be easier if someone were to write new ProDOS
external commands for renaming, copying and deleting files.  These new
external commands could be written to work with both the standard
storage types as well as extended types.

+------------------------------------------------------------------------+
| Jeff Blakeney - Dean of the Apple II University in A2Pro on Delphi     |
|                    Delphi Apple II Forums Web Pages                    |
| A2: http://www.delphi.com/apple2   A2Pro: http://www.delphi.com/a2pro  |
+------------------------------------------------------------------------+
   HyperCard IIgs course now in session in the A2Pro forum on Delphi
        Learn to Program in GSoft BASIC course now in session