I am trying to use the httpserver library. When I load the files from another directory apart from DirAssets, it doesn't work. For example, when I use the code below:
It gives an error that "Error serving request: (FileNotFoundException) java.io.FileNotFoundException: newlink\index.html"
Does it only work with DirAssets? How can I make it work with other directories?
B4X:
Sub GetTemplate(Name As String) As String
If templates.ContainsKey(Name) Then Return templates.Get(Name)
Dim temp As String = File.ReadString(rp.GetSafeDirDefaultExternal("")&"/"&Main.linkname, Name)
Log("temp"&temp)
templates.Put(Name, temp)
Return temp
End Sub
Does it only work with DirAssets? How can I make it work with other directories?