Ask a Question related to Mac Programming, Design and Development.
-
Cor Jansen #1
How to get application directory
Hello all,
My application uses some files that are in the same directory as the
application.
How can a get a path to this directory using carbon?
By the way: can anyone tell me how to find such information. I only see a
index of all funcitons, but how to
search a function you do not the name of?
Is there a search engine that you can tell to find something like "get
application directory"?
Thanks, Cor.
Cor Jansen Guest
-
Please, Help me.. !! ((Can not support NAS or shared folder ? (Application Directory)))
I need to set up application directory in NAS or Network Shared Folder. How can I do that ? In the fms.ini file. VHOST.APPSDIR = z:\myapps ... -
Application Directory Parameter
I want to change the 'Application Directory' parameter of the SimpleConnect control using Actionscript. Maybe a dumb question... but how? This is... -
Web Application, virtual directory
Hi, here the situation: My purpose is to have one physical directory(PD) (c:\webapplication) and a lot of virtual directory(VD) pointing to ... -
Server cannot access application directory ... The directory does not exist or is not accessible because of security settings
If you are using Windows XP in a Workgroup, rather than a Domain, then by default "Simple Filesharing" is turned on, and you won't see a security... -
Server cannot access application directory... The directory does not exist or is not accessible because of security settings.
Hi, I have this issue with the error below. Let me explain my goal and my server environement: Goal: To have 3 separate web servers reading... -
Tom Dowdy #2
Re: How to get application directory
In article <3f5d7ea6$0$58712$e4fe514c@news.xs4all.nl>,
"Cor Jansen"
<corj@removeThisPartIncludingTheUnderscores_dapdes ign.com> wrote:I've traditionally done this by calling GetProcessInfo() on the> My application uses some files that are in the same directory as the
> application.
> How can a get a path to this directory using carbon?
currently running process.
However, under OS X I usually end up using the various bundle calls
because "the same directory as the application" doesn't always mean what
you might wish it to mean.
I decided to try to find out how to do this. It was very complex :-)> By the way: can anyone tell me how to find such information. I only see a
> index of all funcitons, but how to
> search a function you do not the name of?
> Is there a search engine that you can tell to find something like "get
> application directory"?
I went to developer.apple.com and searched for "carbon get application
directory" and found the following page as the first link:
<[url]http://developer.apple.com/documentation/Performance/Conceptual/Performa[/url]
nce/Carbon/Carbon_and__File_System.html>
Look for "parent" on that page and you'll find the following code:
// Get the currently running application's parent folder,
// make it into an FSRef, and iterate it
//
outStatus = FSMakeFSSpec( 0, 0, "\p", &spec );
if( outStatus == noErr )
{
outStatus = FSpMakeFSRef( &spec, &folderRef );
if( outStatus == noErr )
{
outStatus = IterateFolder( &folderRef );
}
}
So, there's another answer to your problem, along with how to find out
information...
Tom Dowdy Guest
-
Miro Jurisic #3
Re: How to get application directory
In article <3f5d7ea6$0$58712$e4fe514c@news.xs4all.nl>,
"Cor Jansen" <corj@removeThisPartIncludingTheUnderscores_dapdes ign.com> wrote:
GetProcessBundleLocation> My application uses some files that are in the same directory as the
> application.
> How can a get a path to this directory using carbon?
hth
meeroh
--
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Miro Jurisic Guest
-
Sean McBride #4
Re: How to get application directory
In article <3f5d7ea6$0$58712$e4fe514c@news.xs4all.nl>,
"Cor Jansen"
<corj@removeThisPartIncludingTheUnderscores_dapdes ign.com> wrote:
If possible, its better to put things in your application bundle's> My application uses some files that are in the same directory as the
> application.
/Resources folder. What kind of files are they?
Sean McBride Guest
-
Eric Pepke #5
Re: How to get application directory
"Cor Jansen" <corj@removeThisPartIncludingTheUnderscores_dapdes ign.com> wrote in message news:<3f5d7ea6$0$58712$e4fe514c@news.xs4all.nl>...
From the one-liners:> Hello all,
>
> My application uses some files that are in the same directory as the
> application.
> How can a get a path to this directory using carbon?
To find where your app is use GetProcessBundleLocation(GetCurrentProcess())
Eric Pepke Guest



Reply With Quote

