Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / OpenToWrite location

Author
Message
Codepunk
18
Years of Service
User Offline
Joined: 24th Jun 2005
Location:
Posted: 15th Aug 2011 22:23
When you use the command OpenToWrite with a filename, where is that filename on the local filesystem? I ran the "WritingToFile" sample in the Windows player but the file that gets created is not in the project folder. Does it go in the TEMP folder?
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 16th Aug 2011 00:03
Files get created in a temporary location. Call GetWritePath to find out where this is.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 16th Aug 2011 01:07
On Windows it is in "My Documents/AGK/UniqueAppName"
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 16th Aug 2011 06:31
This ensures you app can work on lots of different devices that have very different ideas about where writeable files should go

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 18th Aug 2011 11:53
On PCs (windows - mac) it might be a better idea to let the programmer specify his own path instead of it being hardcoded.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 19th Aug 2011 03:26
I can see your point there, especially for those coders who use AppGameKit but are primarily looking to develop a Windows only app. How about a command like:

SetRawWriteDir ( "yourpath" ) - this would be ignored on platforms that cannot change their write path, but on Mac and Windows would write into the Documents folder (i.e. C:\Users\You\My Documents\yourpath)

We want to make sure AppGameKit is always sand-boxed, so there are no commands and no way in which the language could overwrite or destroy system files or gleam private information from the users device. The trick is that every command needs to go through the question 'what would it do on THIS device', and the number of devices grow weekly

I drink tea, and in my spare time I write software.
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 19th Aug 2011 06:16
That sounds like the ideal solution.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 19th Aug 2011 10:39
I think that eventually there will come the need for platform specific commands as PC apps will have different needs & requirements than mobile platforms

Login to post a reply

Server time is: 2024-04-16 09:31:51
Your offset time is: 2024-04-16 09:31:51