File Location on a Mac

Im using this example for a file write operation

http://developer.anscamobile.com/content/file-demo

For this

local filePath = system.pathForFile( “data.txt”, system.DocumentsDirectory )

I have stripped out the system.pathForFile and system.DocumentsDirectory

as I thought it would save the file in the directory where my game files are stored on my Mac however its saving them in my user folder.

Anyone know how to set it to save them in the games root folder. This is just for development on my Mac so doesnt need to work on a device.

Thanks
[import]uid: 44553 topic_id: 21257 reply_id: 321257[/import]

This should work :

[code]
local filePath = system.pathForFile( “data.txt”, system.ResourceDirectory ) [import]uid: 84637 topic_id: 21257 reply_id: 84243[/import]

Had tried that before and it didnt work, so I changed it to just the file name in brackets without the pathForFile and ResourceDirectory but that just saves it to my User Directory.

Any ideas? [import]uid: 44553 topic_id: 21257 reply_id: 85785[/import]

Anyone got any other suggestions?

Need to be able to save a file thats created in the game in the same folder as the game is in for testing locally on my mac [import]uid: 44553 topic_id: 21257 reply_id: 88643[/import]

How are you saving your files? [import]uid: 84637 topic_id: 21257 reply_id: 88644[/import]