Forum Discussion

iBicha's avatar
iBicha
Binge Watcher
3 years ago
Solved

Reading a file from a ComponentLibrary

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?

3 Replies

  • C-DP's avatar
    C-DP
    Channel Surfer

    Use “libpkg:/path/to.json”

    • iBicha's avatar
      iBicha
      Binge Watcher

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

      • C-DP's avatar
        C-DP
        Channel Surfer

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