Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
liran
Level 7

Read files at Roku - failed ?

Hello

I have this code:
file = CreateObject("roReadFile", "temp.txt")
if type(file) = "roReadFile" then 'The file exists
print " file exists."
text = file.ReadLine()
print "content: "+text
else
print "file NOT exists."
endif

at 'videoplayer' sample application.
The file is located at the root folder of the application, and also at the 'source' folder.
But the file object creation is failing ("file NOT exists.").
( I currently don't need AtEof() function )

Why is that ?

Thanks
0 Kudos
4 Replies
destruk
Level 10

Re: Read files at Roku - failed ?

roReadFile isn't a valid component.
Look at roFileSystem, page 112 of the component reference.
0 Kudos
liran
Level 7

Re: Read files at Roku - failed ?

Thanks, I'll try it.

So another question:
What is the official reference should I look at ?
This:
http://c1807832.r32.cf0.rackcdn.com/Com ... ce_v29.pdf
Or this:
http://www.brightsign.biz/documents/Bri ... erence.pdf

Or else ?
0 Kudos
destruk
Level 10

Re: Read files at Roku - failed ?

The information on this page for 2.9 -
https://owner.roku.com/Developer/DevHome

And you might want to ask fopr the beta upgrade to 3.0 for the latest features - information found here: viewtopic.php?f=34&t=39272
to make sure stuff you build won't break in the next release.
0 Kudos
destruk
Level 10

Re: Read files at Roku - failed ?

You may need to sign up as a developer to get access to the developer page - but sign up would be free.
viewtopic.php?f=34&t=36014
0 Kudos