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 / [SOLVED] File() Commands

Author
Message
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 14th Feb 2018 04:35 Edited at: 14th Feb 2018 04:57
A while back I found SetFolder("") made it so AppGameKit wouldn't create a media folder in ./AppData/Local/AGKApps/GameName/. This appears to no longer work, AppGameKit creates the media folder regardless. Can we have AppGameKit not create this folder?


SetRawWritePath(GetDocumentsPath() + "/My Games/GameName")
I'm now using this directory to write files to. However, it still creates ./AppData/Local/AGKApps/GameName/ along with ./AppData/Local/AGKApps/GameName/media/.


GetFirstFile() & GetNextFile() aren't able to see files in the ./AppData/Local/AGKApps/GameName/ directory. Is this intentional?

The author of this post has marked a post as an answer.

Go to answer

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Feb 2018 01:22 Edited at: 15th Feb 2018 01:24
I found this in the help file you may find beneficial

fubar
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 15th Feb 2018 02:03 Edited at: 15th Feb 2018 03:19
Thank you for sharing. I'm familiar with commands.

I'm interested in correcting possible bugs/undesired behavior.

Quote: ""AGK will first look in the write folder before looking in the read folder""

GetFirstFile() & GetNextFile() aren't able to see files in the write folder. I'd like to get a list of files in the write folder.

I've changed the WritePath, but it's still creating the "C:\Users\username\AppData\AGKApps\appName" folder, with a media folder in it.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Feb 2018 07:40 Edited at: 15th Feb 2018 07:46
This post has been marked by the post author as the answer.
You need to forget about GetFirstFile() & GetNextFile() they only work with the projects local directory.
For what you are trying to do you need to look into the RawFolder commands.
Something like this:

Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 16th Feb 2018 17:24 Edited at: 16th Feb 2018 17:25
A request:
We have GetDocumentsPath() ,
Can we have GetUserPath() ?
[example: C:\Users\WinUser or C:\Documents and Settings\WinUser ]

Thanks for the file list code Scraggle, testing it out now!
Nieb
9
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 17th Feb 2018 03:15 Edited at: 17th Feb 2018 03:17
Thanks again Scraggle, your file listing code worked perfectly!

I've just updated the game with it.
https://aaidos.itch.io/sirtet

It's used with the player profile loading/deleting menus.

Login to post a reply

Server time is: 2024-03-28 19:25:41
Your offset time is: 2024-03-28 19:25:41