Open aleung opened 3 years ago
I thought the unionfs is trying to operate on underlay file systems in the same order as the use, but after tested it I found it's in reversed order.
use
It's better to be mentioned in the document.
const {Volume} = require('memfs'); const {ufs} = require('unionfs'); const vol1 = Volume.fromJSON({'/test': '1'}); const vol2 = Volume.fromJSON({'/test': '2'}); ufs .use(vol1) .use(vol2); console.log(ufs.readFileSync('/test', 'utf8')); // 2, NOT 1
Thanks for filing this, @aleung, I had exactly the same question!
I thought the unionfs is trying to operate on underlay file systems in the same order as the
use
, but after tested it I found it's in reversed order.It's better to be mentioned in the document.