ogai_p
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2012
03:25 AM
How to write using WriteAsciiFile?
Hi,
Using this function writes to a temporary file that disappears when my channel is closed:
WriteAsciiFile("tmp:/config.txt", "the text to write")
What filepath should I use so that the data I write still exists once my channel is closed then reopened?
Thanks in advance!
Using this function writes to a temporary file that disappears when my channel is closed:
WriteAsciiFile("tmp:/config.txt", "the text to write")
What filepath should I use so that the data I write still exists once my channel is closed then reopened?
Thanks in advance!
4 REPLIES 4

gonzotek
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2012
04:30 AM
Re: How to write using WriteAsciiFile?
"ogai_p" wrote:You can't write anything permanent to the filesystem(s) on Roku. You can store data in the registry. See roRegistry and roRegistrySection entries in the Component Reference pdf of the sdk. You can store a max of 16KB data. Once you store data into the registry it persists until you overwrite it, the channel is removed by the user, or the player is reset to factory defaults.
Hi,
Using this function writes to a temporary file that disappears when my channel is closed:
WriteAsciiFile("tmp:/config.txt", "the text to write")
What filepath should I use so that the data I write still exists once my channel is closed then reopened?
Thanks in advance!
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2012
08:42 AM
Re: How to write using WriteAsciiFile?
For persistent extra storage, you can write a file like you're doing, and save it off to a web server. However, there is no way to check for a home button press when the channel exits - so you can't count on the data being saved 100%. It's annoying to not have a clean program termination or time to do housekeeping prior to that condition.

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2012
09:46 AM
Re: How to write using WriteAsciiFile?
"destruk" wrote:
For persistent extra storage, you can write a file like you're doing, and save it off to a web server. However, there is no way to check for a home button press when the channel exits - so you can't count on the data being saved 100%. It's annoying to not have a clean program termination or time to do housekeeping prior to that condition.
They used to have that functionality prior to firmware 2.6, but changed it to prevent poorly written channels from locking up the box: viewtopic.php?f=34&t=28472&p=179882#p179882
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2012
10:02 AM
Re: How to write using WriteAsciiFile?
Yeah I remember - but since every public channel must be approved for public consumption, they 'could' change it back. And channels still lock up the box due to internal and secondary bugs with channel code and components, so .... I'm looking at you HULU! HA...