nodejs / NG

Next Generation JavaScript IO Platform
103 stars 12 forks source link

Better FileSystem #7

Open YurySolovyov opened 9 years ago

YurySolovyov commented 9 years ago

Existence of modules like fs-plus or fs-extra seems to be an indicator that current fs module can be not enough. For example there are no methods for copying / moving files and folders.

We can also use this topic for general fs additions / changes, I just started with initial ones.

silverwind commented 9 years ago

On Windows, I've found graceful-fs to be pretty much essential to avoid all kinds of strange errors that won't happen on other platforms.

mikeal commented 9 years ago

I don't think that the existence of third party modules means the stdlib is lacking. If we take that approach we'll end up with the Python stdlib.

That said, if there is fundamental functionality lacking then we should add it. Moving/copying directories seems pretty "fundamental" and also quite difficult and not something where we actually gain much from having multiple implementations.

Fishrock123 commented 9 years ago

Existence of modules like fs-plus or fs-extra seems to be an indicator that current fs module (...)

I think in general, the error (handling) system for fs and similar operations is very raw, and that probably the big pain point.

Maybe the promisified-fs idea could help here?

mikeal commented 9 years ago

I think in general, the error (handling) system for fs and similar operations is very raw, and that probably the big pain point.

Yup, this bit us a bit too when libuv improved their error message streams and we broke a lot of people's more naive tests without realizing we were doing it.