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: 
liran
Visitor

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 4
destruk
Streaming Star

Re: Read files at Roku - failed ?

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

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
Streaming Star

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
Streaming Star

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
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.