Posted: 21st Mar 2023 14:28
Is there any way to read files directly from %temp% as if it were default, like "\media\" ?
Posted: 21st Mar 2023 15:31
SetRawWritePath ( str )
if you use it like this
SetRawWritePath(GetReadPath()) it will write to your media folder
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

+ Code Snippet
SetRawWritePath("C:\Users\skink\AppData\Local\Temp")
Posted: 21st Mar 2023 18:38
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:

+ Code Snippet
Function LoadImageEx( Filename$ )
	FileID As Integer = -1
	
	If GetFileExists( Filename$ )
		FileID = LoadImage( Filename$ )
	Else
		If GetFileExists( "raw:" + GetWritePath() + Filename$ )
			FileID = LoadImage( "raw:" + GetWritePath() + Filename$ )
		EndIf
	EndIf
	
EndFunction FileID


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.
Posted: 21st Mar 2023 22:48
awesome !! it works, thanks