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: 
iBicha
Level 7

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

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

Re: Reading a file from a ComponentLibrary

Jump to solution

Use “libpkg:/path/to.json”

0 Kudos
iBicha
Level 7

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

Re: Reading a file from a ComponentLibrary

Jump to solution

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

0 Kudos