Article Preview
Buy Now
| Print: | |
| PDF: |
Feature
Accessing the File System Directly
Mac OS 9 and X File Declares
Issue: 2.4 (March/April 2004)
Author: Thomas Reed
Author Bio: Thomas Reed has been programming as a hobbyist for more than 20 years, and fell in love with the Mac in 1984.
Article Description: No description available.
Article Length (in bytes): 8,971
Starting Page Number: 32
RBD Number: 2414
Resource File(s):
2414.sit Updated: Monday, March 15, 2004 at 1:00 AM
Related Web Link(s):
http://www.tildesoft.com/Code.html
http://www.bitjuggler.com/extra/
http://developer.apple.com/technotes/tb/tb_535.html
Known Limitations: None
Excerpt of article text...
REALbasic provides a large set of high-level routines for dealing with the file system. These routines are centered around the FolderItem, and provide nearly everything you need for every supported platform. However, at times you need access to the file system in ways that are not provided for you by REALbasic. At these times, you need to call the underlying file system routines manually. This article will cover some techniques for interacting with files in Mac OS 9 and X. Note that it assumes you are familiar with using declare statements to call OS routines. If you are not, this topic was covered in the Advanced Techniques column of the first issue of REALbasic Developer.
Consider the following example. The FolderItem class provides the GetSaveInfo function, which generates an alias-like string. This string can be used later to recreate the FolderItem, even if the original file has been moved or renamed in the interim. (Note that this is not true on Windows or Linux, where the GetSaveInfo data functions more like a path.) This is extremely useful for a variety of applications, but is not always adequate. Suppose that you want actual alias data, perhaps because you intend to use it to manually create an alias file. The data returned by GetSaveInfo on the Mac OS does contain alias data. However, since it is enclosed in a custom opaque data type that is not documented, it is not available for use. You will need to call file system routines directly to obtain alias data.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|










