memfs icon indicating copy to clipboard operation
memfs copied to clipboard

feat(volume): add caseSensitive option

Open ajafff opened this issue 4 years ago • 4 comments

Defaults to 'true'. If 'false', handle file names case insensitive. Preserve original file names.

Fixes: #533

ajafff avatar Feb 09 '21 21:02 ajafff

I'll review this properly when I have a chance, but for now: I think I'd prefer this option to be ignoreCase with a default of false rather than have an option with a default of true as that tends to be easier to reason mentally.

G-Rath avatar Feb 09 '21 21:02 G-Rath

@G-Rath that makes sense. I'll update the PR accordingly.

I noticed that the sorting of readdir(Sync) should also respect case sensitivity. I'm currently working on that.

I should probably also update the docs.

ajafff avatar Feb 10 '21 09:02 ajafff

+1 for this. I'm playing around with using memfs in conjunction with some libraries that are assuming case-insensitivity on Windows platforms, which isn't the case when I'm using memfs! This would be an ideal fix.

tstordyallison avatar Feb 20 '21 11:02 tstordyallison

+1 Just hit the same issue with memfs on windows

jburrow avatar Feb 22 '21 08:02 jburrow

Closing due to age - feel free to rebase this PR or open a new one if someone wants to pick it back up

G-Rath avatar Sep 15 '23 22:09 G-Rath