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: 
iBicha
Binge Watcher

Reading a file from a ComponentLibrary

Jump to solution

I'm having trouble reading a file in a ComponentLibrary.

The file I want to read is in the ComponentLibrary. The code to read the file is also in the Lib.

Doing ReadAsciiFile("pkg:/config/some_file.json") results into an error.

Can component libraries not read from a file?

 

If this is actually a limitation, what other things can't a ComponentLibrary do?

0 Kudos
1 Solution

Accepted Solutions
C-DP
Channel Surfer

Re: Reading a file from a ComponentLibrary

Jump to solution

Use “libpkg:/path/to.json”

View solution in original post

0 Kudos
3 REPLIES 3
C-DP
Channel Surfer

Re: Reading a file from a ComponentLibrary

Jump to solution

Use “libpkg:/path/to.json”

0 Kudos
iBicha
Binge Watcher

Re: Reading a file from a ComponentLibrary

Jump to solution

Thank you. Is libpkg: also a read only volume similar to pkg:?

0 Kudos
C-DP
Channel Surfer

Re: Reading a file from a ComponentLibrary

Jump to solution

I have not tested my self but I believe it is. 

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.