Sponsor FloSync Free digital signage & video wall software for Mac and Windows Download Free

GLoAppFolder.sit - support for accessing application folder

Source in C, Pascal, etc. Note: apps that come with source should be included here as well as the appropriate software directory.
Post Reply
User avatar
Info-Mac
Administrator
Posts: 13716
Joined: December 21st, 1988, 11:00 am

GLoAppFolder.sit - support for accessing application folder

Post by Info-Mac »

Download: http://archive.info-mac.org/dev/src/glo-app-folder.hqx

GLoAppFolder class
Copyright © 1997 Gregory Lo. All rights reserved.
Description:
This class provides some support for accessing files and
subfolders in the same folder as the application.

Notes:
Near the start of your application, just make a call to
GLoAppFolder::Startup(); This initializes a static FSSpec with the
location of your application.

Various calls are provided to create modified FSSpecs based on
this one; and open resource files in those places.

You can change the FSSpec using file or folder name strings from a
string list resource, or via a pointer to a pascal string. For
instance:

* osErr = GLoAppFolder::MakeFSSpec( "\pPlugins", myNewFSSpec );
* osErr = GLoAppFolder::MakeFSSpec( kFolderNamesID,
kPluginsFolderName, myNewFSSpec );

* refNum = GLoAppFolder::OpenResFile( "\pSounds", fsRdPerm );
* refNum = GLoAppFolder::OpenResFile( kFileNamesID,
kSoundsFileName, fsRdPerm );

Other information accessors are provided.

* vRefNum = GLoAppFolder::GetVolumeRefNum();
* parID = GLoAppFolder::GetParentID();

* myConstFSSpecPtr = GLoAppFolder::GetAppFileFSSpecPtr();
* myConstFSSpecRef = GLoAppFolder::GetAppFileFSSpec( void );

Change history:
04Nov1997 * Updated documentation
Contacting the Author:
email: * [email protected]
* [email protected] (before May, 1998)
License:

License is given to freely use this in any of your code:
commercial, or otherwise. Send me a postcard or email if you do.
Copyright © 1997 Gregory Lo. All rights reserved.
Post Reply