joyent/node — Issue #2075: Invalid file names in output from fs.readdirSync
Author: ArturDorochowicz
Created: 2011-11-11 19:21:35+00:00
State: open

fs.readdirSync seems to have some kind of an internal buffer of around 2k chars for file names. File names beyond that limit are wrong/mangled. My environment is node 0.6.0 on Windows 7 x64

To reproduce create files in a directory whose total length of file names exceed ~2k chars, e.g. 11 files of ~200 character file names, then run

```javascript
var fs = require('fs'),
dirFileArray = fs.readdirSync('subdir'); // <- directory that we check

for (i = 0; i < dirFileArray.length; i++) {
console.log(dirFileArray[i]);
}
```
The file name(s) is cut off.