Forum Discussion

amrinder_singh's avatar
14 years ago

Save File to Roku (Local Memory of Roku)

Hi,

I am trying to save an XML file on Roku for some development purpose. is this possible ..?
If yes, Please help me?

Thanks.

2 Replies

  • You can save files to tmp:/ but they will evaporate when you exit the channel. If it is less than 16k you might try to save it in your registry. You can download using roURLTransfer's gettofile() or you could use gettostring() and save to the registry or write to a file using writeasciifile()

    - Joel
  • Assuming the XML file is already on your development computer:

    If you have a file, file.xml, you can put the file in your top-level development directory (the one containing the 'source' directory and 'manifest' file, etc.) and it will be available from your code after you side-load it to the Roku. You can access it using the file-name: pkg:/file.xml

    Or, you can create a directory under your top-level directory, e.g. 'xml' and put your xml files there. You can access them as: pkg:/xml/file.xml