Hi! What level of support does memfs have for permissions today?
I'm migrating from mock-fs, which allowed me to create read-only files in tests with something like
mockFs({
fileName: mockFs.file({ mode: 0o444 });
})
In memfs, it seems the read-only permissions aren't respected, i.e. this doesn't throw an error like I'd expect:
vol.fromJSON({
fileName: 'some existing content',
});
vol.chmodSync('fileName', 0o444);
vol.writeFileSync('fileName', 'new content'); // doesn't throw
Should I expect this to work, or perhaps am I doing something incorrect?
Thanks!
Hi! What level of support does memfs have for permissions today?
I'm migrating from
mock-fs, which allowed me to create read-only files in tests with something likeIn
memfs, it seems the read-only permissions aren't respected, i.e. this doesn't throw an error like I'd expect:Should I expect this to work, or perhaps am I doing something incorrect?
Thanks!