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] Is it possible to set the folder for reading files in %Temp% ?

Author
Message
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 21st Mar 2023 14:28
Is there any way to read files directly from %temp% as if it were default, like "\media\" ?

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: 21st Mar 2023 15:31
SetRawWritePath ( str )
if you use it like this
SetRawWritePath(GetReadPath()) it will write to your media folder
fubarpk
https://fubarpk.itch.io/
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 21st Mar 2023 17:00
it seems it didn't work... when using the command below, and trying to display with (do print(GetReadPath()) sync() loop ) still continues to display the media path of the AppGameKit project




Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 21st Mar 2023 18:38
This post has been marked by the post author as the answer.
Read Path will be to your Application Directory., Write Path will be to your User App Directory

Note: AppGameKit is supposed to check both your Read and Write Folders when trying to Read / Load a File., but in the past I have had issues where it would handle these exclusively meaning I'd have to write something like:



Now on my Windows PC the functions will return the following:
(Project I'm using in this example is ForumExample)

"D:\AGK Projects\ForumExample\Media" = GetReadPath( )
"C:\User\Robert\AppData\Local\AGKApps\ForumExample\Media" = GetWritePath( )

As noted in my example., we can always use "raw:" as a prefix to provide an absolute location.
If we don't use this then what we're defining is a relative location.

I'd argue it would be nice if we could have another Pre-Defined Location by AppGameKit
GetDocumentsPath( )

The reason being is that the Documents Path exists on all OS and is readily accessible by the User., usually has a shortcut.
It is after all a "Public" area so to speak that is easily accessible... great for Save Files, Screenshots, Videos, etc.
I mean we can technically figure it out from the Write Path (on Windows) but other OS have it in a different location rather than part of the User Account Folders.
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 21st Mar 2023 22:48
awesome !! it works, thanks

Login to post a reply

Server time is: 2024-11-23 09:43:46
Your offset time is: 2024-11-23 09:43:46