|Apr 5, 2012, 08:46 PM||#1|
Where does Xcode save a .dat file?
I am taking a C++ class and i'm using Xcode to do all the projects, because it is just some much nicer then MS Visual, anyways. The project i'm on is about learning to read/write to a random access file using fstream and the such.
A part of the code creates a .dat file the fist time the program is ran. Everything works just fine when i compile and run but i can't seem to find where the .dat file is saved.
I have tried searching for it through finder but all it pulls up is the main.cpp file where it is created.
|Apr 5, 2012, 09:56 PM||#2|
Find your executable in your project window, right click, "Show In Finder", it should be in the same directory as the executable... which, because the executable is temporary, Xcode buries it deep within your ~/Library folder.
I like to make a folder in the project directory and create the file there.
EDIT: This was true in C. I assume c++ would be the same.
|Apr 5, 2012, 10:32 PM||#3|
What you told me worked perfectly found the .dat file. The path i pasted is the path i get from right clicking on the file and clicking get info. The problem i have know is i can't navigate to it through Finder. After i click on user -> jokerfwb there is no library folder listed.
Also how do you go about creating a folder in the project directory and creating the file there?
|Apr 5, 2012, 11:19 PM||#4|
The Library folder is hidden by default. You can make it visible, e.g. following the advice from this site:
You should be able to tell the program where to save it's file. I assume that right now it is saved in a location relative to the location of the executable, which, since you are using Xcode, is hidden deep inside the library.
|Apr 6, 2012, 12:33 AM||#6|
It shows exactly how to change the working directory for an Xcode 4 executable.
What's a working directory?
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|How to make a file save on Xcode?||OSX Buddy||Mac Programming||11||Apr 21, 2014 02:28 PM|
|Where does Xcode save project snapshots?||MacMan988||iPhone/iPad Programming||2||Mar 28, 2014 02:32 AM|
|Save File Transfer Help||SkyStormXD||iPad Apps||0||Mar 13, 2014 10:54 PM|
|Xcode file output||xcodeROOKIE||Mac Programming||5||Oct 4, 2013 02:52 PM|
|Excel changing to .dat file from Mac to PC||sara.leonard||Mac OS X 10.7 Lion||3||Aug 29, 2012 09:07 PM|
All times are GMT -5. The time now is 01:27 PM.