Forum Discussion
destruk
11 years agoStreaming Star
data=ReadAsciiFile("tmp:/example.txt")
WriteAsciiFile("tmp:/example.txt", data)
http://sdkdocs.roku.com/display/sdkdoc/ ... ngasString
WriteAsciiFile("tmp:/example.txt", data)
http://sdkdocs.roku.com/display/sdkdoc/ ... ngasString
chaklasiyanikun
6 years agoRoku Guru
Is there any way to find File Location on temporary storage. getPath() or any else?
- speechles6 years agoRoku Guru
You mean so you can know if you need to read ahead of your write?
Sub LogMessages(message As String) ' write active logs in temp fileName = "tmp:/logmessages.txt" LocalFileBrowser = CreateObject("roFileSystem") if LocalFileBrowser.exists(fileName) text = ReadAsciiFile(fileName) else text = "" end if WriteAsciiFile(filename,text+chr(10)+message) End Sub
You could probably do something like the above. Not sure entirely what you are after.
- chaklasiyanikun6 years agoRoku Guru
Here I tried to find a file path like a tree structure. In package storage, I created a one folder image and inside an image folder stored 1.txt file and I tried to find my file Location like a pkg:/images/1.txt using only file name 1.txt.