Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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.
0 Kudos
2 REPLIES 2
RokuJoel
Binge Watcher

Re: Save File to Roku (Local Memory of Roku)

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
0 Kudos
belltown
Roku Guru

Re: Save File to Roku (Local Memory of Roku)

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
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.