Apple, the Apple logo, and Macintosh are registered trademarks of Apple Computer, Inc.
Mac and OpenDoc are trademarks of Apple Computer, Inc.
Introduction
This is a utility file that is used by OpenDoc. Developers can use it at their own risk. This class provides an object-oriented interface to a file system file.
Many of the methods have names that are self-explanatory or have equivalent functions in the file system. These functions are not being documented fully here.
These methods are used to specify the file on which the PlatformFile object manipulates. These methods can only be called once in the lifetime of the object. If you want to work with a different file, you need to delete the current object and create a new one.
inline ODFileSpec& GetFileSpec();
This method returns the file spec of the file to which this object refers.
Given in this a platformfile (whose filespec only is used) that may conflict with an existing file, deal with this conflict in one of two ways depending on the value of action. The two values are:
1. kSpecifyNewNameOnly: just change the name field of the filespec so that the platform file represents a file that would be unique if created
2. kRenameInPlace: this file already exists, but we want it to have a different name so we can reuse this one. Find that name, and rename the actual file.
Two string templates are expected, and the caller can either pass in their resource IDs or StringHandles to the strings themselves, signifying the latter with a resource ID of kODNoResourceID. The first of these strings is used the first time through the renaming loop (which typically sticks something like " copy" on the end of the file name, and the second is used thereafter (when increasingly large numbers are put into the string in an attempt to make it unique.
ODNVMethod ODULong GetAllocationBlockSize();
This method returns the allocation block size.
ODNVMethod void BumpFolderModDate();
This method updates the folder modificaiton date.
ODNVMethod ODBoolean IsInTrash( );
This method returns kODTrue if the file this object refers to is in trash.