Reading and writing from a temporary file in Roku

In Roku, how do I read and write data from a temporary file in the tmp: folder? I cannot find documentation related to this. The data that I store is too large to be stored in the registry.

+5
source share
1 answer

There are two simple functions: reading and writing data from the tmp:/ folder:

  • ReadAsciiFile (file path as String) as a string

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

  • WriteAsciiFile (file path as String, text as String) as Boolean

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

Additional documentation in the source.

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

+6
source

All Articles