question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for case sensitivity settings

See original GitHub issue

Hi! As you probably know, there are 2 options for case sensitivity:

  • Windows use case sensitive paths,
  • other systems like macOS or Linux use case insensitive paths

I checked how memfs behave and it seems that it uses case sensitive approach:

const { fs } = require('memfs');

fs.writeFileSync('/my/Case/sensitive/Path.txt', 'content');

console.log(fs.readFileSync('/my/case/sensitive/path.txt'));
// logs undefined
// if I would use native fs on macOS or Linux, I would get "content" logged
// so it's kind of inconsistency between memfs and fs

It would be nice if:

  1. there would be an option to configure it
  2. the default behavior would be to use system settings

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ajafffcommented, Feb 9, 2021

Turns out this is not that hard to implement. I opened #632 to make case sensitivity configurable.

1reaction
piotr-olescommented, May 12, 2020

I might be missing something, but:

As you probably know, there are 2 options for case sensitivity:

The OSs act the opposite way around from your list: Windows is case insensitive, while UNIX is case sensitive.

Yes, I was wrong about Windows, but still, macOS is case-insensitive 😃

Because of that, I think you could make a case for saying something like having the current behavior being the “default”, and then implementing a ignoreCase option that causes memfs to just call toLowerCase on everything?

Yes, Implementing it just as a configuration option would be enough 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adjust case sensitivity - WSL - Microsoft Learn
Learn how case sensitive file names are handled between Windows and Linux file systems, how to adjust these settings by directory with WSL, ......
Read more >
Case sensitivity (Reference) - Prisma
Options and recommendations for supporting case-insensitive filtering and sorting with Prisma Client depend on your database provider.
Read more >
Understanding Password Case Sensitivity and Upgrades
For greater security, Oracle recommends that you leave case-sensitive password-based authentication enabled. This setting is the default. However, you can ...
Read more >
How to Check Case-Sensitivity in SQL Server - Webucator
The way to determine if a database or database object is to check its "COLLATION" property and look for "CI" or "CS" in...
Read more >
Oracle case-sensitivity - Amazon S3
You can set the Oracle database to the desired case-sensitivity when you create it. Refer to the HP Service Manager Installation Guide for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found