Comments (9)
🙂 ooh, do let me know if you do! and happy christmas!
from create-readdir-stream.
Okey, I'll ping you if I can do something. Happy to you too.
from create-readdir-stream.
Mm not sure. It just does single call of fs.readdir
with given dir. I don't tested it yet, but I believe recursion can be done easily through plugins - no matter it is "regular/smart" or "pipeline" plugin. Actually these "smart plugins" is just a step before pushing the paths to the stream, so then these "pipeline" plugins (think "gulp plugins" which are just [transform] streams) will be used only on these paths.
The cool and lightweight thing is that it doesn't do any more I/O than fs.readdir
, so you can add plugin that calls fs.(l)stat
, then check if filepath is directory and etc.
But in anyway, I won't recommend it for such case. It exists for another reason.
In your case you, it may be better to use glob-stream
package or directly glob
. I have absolutely times faster and better library (than mentioned) for globbing and recursion and such stuff. But it's not stable and public currently.
from create-readdir-stream.
Thank you for your help, unfortunately glob
also appears to use fs.readdir rather than the underlying POSIX version (unlike the module I linked above) and so the problem still exists.
from create-readdir-stream.
I don't know why you want to use natives, when nodejs tries to do its best. And globbing is largely used everywhere. But okey, you may want to try https://github.com/jonschlinkert/bash-glob then, which uses native bash and globbing. Just not sure how good it works in Windows.
from create-readdir-stream.
with ten million files? Node does try its best, but as memory shoots into the gigabytes the best is sadly not good enough. I will read about bash-glob, thank you for your advice, it is very very much appriciated
from create-readdir-stream.
with ten million files?
Not sure. In anyway it seems like an edge case. Try first, before searching for native things.
It's interesting to me, what's that case? What are these files? What will do them?
edit: i'll go close this, cuz I can't do anything and because it's out of the scope and purpose of this package.
from create-readdir-stream.
Yes, it should be closed.
It is a piece of medical analysis equipment which writes this many files into a single folder. This is obviously insane (!), but we are not in control of the hardware and the output is out of our hands. Perhaps node is not the correct technology for this project but I think with C++ bindings it should be possible!
Thank you for all your help and good luck with this project.
from create-readdir-stream.
Huh, yea, strange case.
Maybe I can think for wrapper or something in a future.
from create-readdir-stream.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-readdir-stream.