Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read and write from temp file in Roku

In Roku, how do I read and write data from a temporary file in the folder tmp:? I cannot find any documentation relating to this. The data which I am storing is too big to be stored in the registry.

like image 316
khateeb Avatar asked Jul 30 '15 11:07

khateeb


1 Answers

There is two simple functions do read and write data from tmp:/ folder:

  • ReadAsciiFile(filepath as String) as String

    text=ReadAsciiFile("tmp:/config.txt")

  • WriteAsciiFile(filepath as String, text as String) as Boolean

    WriteAsciiFile("tmp:/config.txt", "the text to write")

Further documentation in source.

Source: http://sdkdocs.roku.com/display/sdkdoc/BrightScript+Language+Reference#BrightScriptLanguageReference-78ReadAsciiFilefilepathasStringasString

like image 108
Roberto14 Avatar answered Oct 21 '22 05:10

Roberto14