OS X files location?

Hi,
I am now trying to convert my compiled Windows program to run on OS X.

I am a bit confused regarding the OS X app structure.
On Windows, I have the .exe file, and an accompanying folder which contains all the database files etc.

However, on OS X apps, there is always just the app and everything seems to be contained within it.
Therefore, I need help on how to embed all of my accompanying db files into the compiled app.

Hope that made sense.

Thank you all in advance.

You really shouldn’t have the DB files in the same folder as the application (on any platform)… Windows will virtualize the file and the directory structures and on Mac OS X and *nix your user may not have the permissions to modify files in the directory where it is installed… Take a look at the SpecialFolder class… You are interested in the ApplicationData folder name… Of course, if this is just a read-only database, then feel free to place it wherever you want :wink:

I am now a bit lost??

What I meant is that I currently have a USB stick containing my .exe file, and a folder containing the db files (it has to be this way for numerous company reasons).

In order to convert my app to OS X, how do I get the db files inside the actual app (as OS X apps seem to be just a single icon).
In other words, I need a USB stick containing my OS X app and (writable) db files (which it seems should somehow magically be one single executable icon.

ALL the files need to be on the USB stick so that the app can be run from ANY location (home, office, clients machine etc.).

Hope that made more sense.

Thanks.

You do not usually store application data… in the OS X application bundle.

What you have to do is to create a folder and place your data base files in it, beside the OS X application.

This can work on a Memory Stick (with eventual slowdown due to the MemoryStick).

Thanks.
So basically it is the same as on Windows - A USB stick with the app itself and a separate folder containing the db files.

What did you mean by eventual slowdown due to the memory stick?
I currently run the Windows version of my app from the USB stick all day, and it doesn’t get any slower?
Is this something OS X specific?

Once again - Thank You.

[quote=38008:@Richard Summers]Thanks.
So basically it is the same as on Windows - A USB stick with the app itself and a separate folder containing the db files.

What did you mean by eventual slowdown due to the memory stick?
I currently run the Windows version of my app from the USB stick all day, and it doesn’t get any slower?
Is this something OS X specific?

Once again - Thank You.[/quote]

memory (USB) sticks wear out. They are only intended for “X” amount of read/writes. So if you do “lots” of IOs to it, they will wear out. I have a drawer full of sticks that have worn out. Now using the stick to have files on it that you move from computer to computer, you will most likely not wear the stick before you loose it.

this is a known issue with “flash” based memory. I could always go into more detail but I would probably bore the hell out of you. I am a storage engineer.

sb