File System Objects

A data file object in the Workplace Shell represents a real file in the file system. If the user shreds the object by dragging its icon to the shredder, the file is deleted.

The only view which is always available to a data file is the Settings view. Settings are stored in extended attribute (EA) files. Refer to Extended Attributes for more information on EAs. Settings are displayed in a separate window from the main window, using a notebook control.

The difference between descriptive and physical names is important. The descriptive name (or "object title") is the name which appears under the icon. It can be set in the "Title" field in the Settings view, or by "direct editing". The physical name is the actual name by which the data file is known to the file system. It can be set in the "Physical name" field in the Settings view.

The two need not be the same. This provides an advantage in that long, meaningful icon descriptions can be used even without HPFS.

The filename and object title are synchronized as much as possible. However, in FAT file systems the physical name is limited to 12 characters. When the description is longer than FAT will support, the filename is truncated. If a similar filename already exists, a version number is appended to it, However, the WPS always tries to ensure that the digits at the end of the filename match those in the title of the object. For example, a file with the title "My File : 22" might have a filename of "My_Fil22" on FAT and "My File : 22" on HPFS.

There is some possibility for confusion in both file systems, since two objects within the same folder can have the same descriptive name even though they have different physical names. Figure "Effect of Changing Description on HPFS file names" shows the effect of "direct editing" an icon description.

This is another reason for using the HPFS disk format: if you change the file description the WPS automatically changes the filename to be the same as the description. As you can see, the description and icon for the object are stored in the files Extended Attributes (EAs). When you copy the file under OS/2 V2.0, its EAs are copied too.

The operating system settings determine what happens when you try to copy a file into a directory which already contains a file of that name. If a user copies an object to a folder where an identically named object already exists, the Workplace Shell will prompt the user to change the name (this is the default setting). The WPS applies a similar protection if the user tries to rename the object using "direct editing" of the icon description, but will not prevent the user from changing the title in the Settings view.

For example, if a user copies a file to another folder, changes the contents, then copies it back to the original folder, the filename will be changed as in Figure "Effect of Copying Files on Filenames."

When you copy the file from FOLDER1 to FOLDER2, the filename stays the same (ABCD.XYZ). When you copy it back to FOLDER1, the user is prompted to change the filename to ABCD1.XYZ. This is because the WPS believes that it should not destroy user data by default.

Sometimes this is very useful. For instance, if you copied a spreadsheet, changed it extensively but forgot to rename it, then copied it back, you would be horrified if you then realized you had just copied over the original - which was just as important as the new one!

A data file may associated with an executable file. This allows the program to be started and the data file passed to it when the data file is double clicked on. This is discussed in more detail in File Associations.

Making a filename association in a program and setting the file type attribute in an associated data file can sometimes cause problems. This is because filename associations take precedence over file type associations. So if a user subsequently wants to change the file type for an object to use a different program with it, the file extension association will prevent him from doing so.


[Back: Folders]
[Next: Shadows]