Ken said:
Wolf K said:
On 2013-08-22 3:16 PM, Steve Hayes wrote:
Perhaps when [MS] introduced "folders" people took them as just
another name
for "directories", but the definition of a folder is an object that
contains
other object, and it is not necessarily a directory. Some folders are
directories, and behave like directories, but others are not.
I don' think that's a clear explanation. AIUI, an Object is a
programming element that accepts some input(s) and provides some
output(s). From the user's POV, a well tested Object is a chunk of code
that functions like a black box. I can see programming a directory as
an Object, but I don't know whether that's how folders are actually
implemented in Explorer.
In any case, how Explorer implements folders is irrelevant, since
functionally, folders in Explorer are directories: they are lists of
files, including files which are themselves lists of files, aka
subdirectories or sub-folders. And so on, nesting as many levels as
you like to some limit built into the OS.
The fact that "folder" is used for other kinds of objects is IMO A Very
Bad Idea, and not only MS is guilty of this, viz. the "folders" in
Thunderbird. Only if the folder has subfolders is it an actual folder
(directory). The lowest level in any TB folder tree is a dual file, one
containing the messages, and the other an index to those messages.
I suspect that "folder" was originally used because a) it's shorter and
easier to say than "directory"; and b) it reminded the users of file
folders, the actual physical objects they were used to. The metaphor
worked, IOW. But since then, things have gotten messy. Bah!
Another reason things have got messy is the Windows default setting that
hides the extensions of known file types in Explorer. Because of this,
a folder can contain more than one item with (apparently) the same name.
This breaks a Golden Rule of directories.
No, it actually doesn't break the rule. What the user sees looks like
it breaks the rule, but it doesn't since the user just isn't seeing the
full filename. Macs have done this for years, AFAIK. When using a Mac,
I always show the extensions so I know what type of file I'm dealing with.
The system works with the full filename, AFAIK, not just what the user
sees.
Macintosh is more complicated than that. The file extension on a Mac,
is mainly a "hint" to the user, a carry-over from a Windows
dominated world.
http://en.wikipedia.org/wiki/Resource_fork
"Note that the Macintosh file systems also have a separate area for
metadata distinct from either the data or resource fork. Being part
of the catalogue entry for the file, it is much faster to access this.
However, the amount of data stored here is minimal, being just the
creation and modification timestamps, the file type and creator codes, <---
fork lengths, and the file name."
You can set the Type and Creator fields for a file, with a separate
utility. I use FileTyper for this, but I can't even find a picture
of it any longer. This is an example of something similar. This
is a utility that allows setting Type and Creator metadata. The
Type field has storage space for four characters, and so does
the Creator field. A Type value of "TTXT", is a text file.
http://dazuma.freeshell.org/filetyper/graphics/shot1.gif
If I have a file "blah.pdf", if I set Type and Creator to "PDF " "CARO",
then when I double-click the file, Acrobat Reader opens. If I download
a PDF file from the Internet, and double-click it, the default
system PDF viewer opens instead. Using that metadata, is
very convenient, for doing a file-by-file binding of default
application, to the file. No extension necessary. The extension
is a "hint" for humans. Using Type and Creator field, and
setting the files one by one, I can have half my PDF files
open in System PDF viewer, half of the files open in Acrobat
Reader, when they're double-clicked.
Unix systems use /etc/magic, as a series of file signatures.
(And the newer MacOSX is a Unix based OS underneath.)
That's how a Unix system can tell what a file is, without
relying on the file extension. If I store a "blah.pdf" download
as "blah.txt", Unix knows the file is a PDF, based on
checking the signature. The /etc/magic file is updated
on a regular basis, as more file types come into existence.
For example, I counted 136 separate classifications for text
files alone. That's how many unique characteristics they have.
(This is not the magic file. This is to demonstrate the examination
of files with a hex editor, to see the unique fields that identify
them. And allow a /etc/magic file to be constructed. Generally,
the objective is, to not read more than the first 1024 bytes
in a file, to figure out the file type.)
http://www.garykessler.net/library/file_sigs.html
Some more examples of the complexities of Mac, here. People
demonstrating the usage of the above.
http://macosx.com/forums/apple-news-rumors-discussion/9985-type-creator-vs-suffix.html
The Mac certainly works without intervention. But it's
capable of much more. If you know how some of those
things work, you can avoid that system PDF viewer from
opening
I hate that thing.
Seeing the ".txt" on a file, makes it easier for Window refugees,
to drag and drop their file onto the SimpleText icon. I
certainly use and appreciate the presence of an extension on
a file. But I also use FileTyper a lot to make things work better.
I don't really like SimpleText all that much, which is why
I'd set my .txt files so BBEdit Lite opens them.
Windows does this binding globally, and there's nothing
wrong with that. At least, as long as you don't go changing
the file extensions. And most people don't do stuff like that.
That's probably one reason Windows hides the extension by
default, so you won't be tempted to mess around.
Paul