Sharing Files In Snaps
August 30, 2016
Since I figured part of this out, I felt like I'd share it.
To use the 'content' interface to share files, you need to have special YAML in both the consuming snap and the producing snap. These dictate which paths are shared, and where they show up in the consuming snap's file space.
In the producing snap's yaml, add:
slots: interface-name: interface: content read: [ path1, path2 ]
This goes in the TOP LEVEL of the yaml. Then, in the consuming snap, you have to add a similar block to the top level there:
plugs: interface-name: interface: content target: producer-mount
Note that the consuming snap MUST have a directory to serve as a mount point for the producer's files, and you have to create this yourself. I have just been using a directory containing a directory, and this yaml at the bottom of the parts list:
mountpoint: plugin: dump source: mountpoints
Then, just have mountpoints/producer-mount in there, and it should all just work.
Categorized as: Linux | Ubuntu
Leave a Reply