Code Monkey home page Code Monkey logo

co-fs's Introduction

co-fs's People

Contributors

forbeslindesay avatar juliangruber avatar tj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

co-fs's Issues

Expose createWriteStream

Since we are including co-fs as var fs;, and the this module exposes createReadStream, but not createWriteStream, it would be nice to be able to expose that last one, too.

Can't rename a file?

I try to rename a file using:

yield fs.rename(src, dest);

Yet, I got the following error:

TypeError: You may only yield a function, promise, generator, array, or object, but the following object was passed: "undefined"
      at next (/home/jpetitcolas/dev/xxx/node_modules/koa/node_modules/co/index.js:101:25)
      at onFulfilled (/home/jpetitcolas/dev/xxx/node_modules/koa/node_modules/co/index.js:69:7)

fs.js:77
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
            ^
Error: EXDEV, rename '/tmp/lazg2qxdek4kj4i/file.png'

I am using Koa 1.0.0 and co-fs 1.2.0. Any idea? :)

lchown undefined @ node-v0.11.6

I don't know if it has to do with the library itself, but it's failing on require('co-fs') because lchown is undefined on fs for node-v0.11.6

Error: fs.lchown does not exist

fs.exists returns a function

With this code

var cofsTest = function * () {

  console.log("Unknown file", yield fs.exists('random.file'));
  console.log("this file", yield * fs.exists(__filename));

  return true;
};
var generator = cofsTest();
var genResult;

while (!(genResult = generator.next(genResult && genResult.value)).done);
console.log("Test", genResult.value);

I get this result

Unknown file function (done){
    fs.stat(path, function(err, res){
      done(null, !err);
    });
  }
this file function (done){
    fs.stat(path, function(err, res){
      done(null, !err);
    });
  }
Test true

Where I would have expected something like

Unknown file false
this file true
Test true

Outdated thunkify dependency

Hi,

Your package.json depends on thunkify v0.0.1. Latest version of thunkify is however 2.1.2.

You can always verify dependencies versions with npm outdated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.