Datei vorhanden?
bearbeitet von
Hallo effel,
wenn du case-sensitive in Nodejs für fs module haben möchtest, musst du auch ein entsprechendes Filesystem verwenden, das case-sensitive ist. Sonst wird das nichts. Steht auch so in der Doku von Node.js
"Case Preservation
You may create a directory called test/abc and be surprised to see sometimes that fs.readdir('test') returns ['ABC']. This is not a bug in Node. Node returns the filename as the filesystem stores it, and not all filesystems support case-preservation. Some filesystems convert all filenames to uppercase (or lowercase)."
Kurzum, nutze ein Betriebssystem, das entsprechende Filesysteme beherrscht/unterstützt. Oder nutze eine Datenbank, mit der man gut ein FS immitieren kann.
Gruss
Michael
Datei vorhanden?
bearbeitet von
Hallo effel,
wenn du case-sensitive in Nodejs für fs module haben möchtest, musst du auch ein entsprechendes Filesystem verwenden, das case-sensitive ist. Sonst wird das nichts. Steht auch so in der Doku von Node.js
"Case Preservation
You may create a directory called test/abc and be surprised to see sometimes that fs.readdir('test') returns ['ABC']. This is not a bug in Node. Node returns the filename as the filesystem stores it, and not all filesystems support case-preservation. Some filesystems convert all filenames to uppercase (or lowercase)."
Kurzum, nutze ein Betriebssystem, das entsprechende Filesysteme beherrscht/unterstützt.
Gruss
Michael
Datei vorhanden?
bearbeitet von
Hallo effel,
wenn du case-sensitive in Nodejs für fs haben möchtest, musst du auch ein entsprechendes Filesystem verwenden, das case-sensitive ist. Sonst wird das nichts. Steht auch so in der Doku von Node.js
"Case Preservation
You may create a directory called test/abc and be surprised to see sometimes that fs.readdir('test') returns ['ABC']. This is not a bug in Node. Node returns the filename as the filesystem stores it, and not all filesystems support case-preservation. Some filesystems convert all filenames to uppercase (or lowercase)."
Kurzum, nutze ein Betriebssystem, das entsprechende Filesysteme beherrscht/unterstützt.
Gruss
Michael