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.

Newcomers AppGameKit Corner / Default folder for files

Author
Message
Kot
7
Years of Service
User Offline
Joined: 2nd Mar 2017
Location:
Posted: 11th Nov 2017 22:33
When I used command OpenToWrite, it created file somewhere, but I couldn't find it in media folder in my program catalogue. It was seen by my program, because GetFileExists saw it. I searched all my disks and found it in C:\Users\MyIdentity\AppData\Local\AGKApps\MyProgram\media How can I make it write to MyProgram/media catalogue, where the source code and the executable is? I don't want to use absolute path, so my question is how to change default catalogue for OpenToWrite command?
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Nov 2017 23:53 Edited at: 11th Nov 2017 23:54
SetRawWritePath( GetReadPath() )

Quote: "

SetRawWritePath()
Description

Sets the folder where files created by AppGameKit will be stored. This has no effect on iOS since it cannot write outside its app folder. You can set this to any absolute path on the device, however some locations, such as the Program Files folder on Windows, will require administrator privileges to write to them. Some locations will be protected by the operating system, SetRawWritePath will let you set the path to these locations but any attempt to write to them will fail. You can use GetDocumentsPath to get the system defined documents folder for the current user, or sdcard folder on Android, which is guaranteed to allow write access.

This command is now deprecated. The preferred method of accessing files outside of the usual write folder is to use the OpenRawFolder commands and "raw:" file paths.
"

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-04-26 04:00:52
Your offset time is: 2024-04-26 04:00:52