Files
node-v0.x-archive/src/node_file.h
Ryan Dahl 3414eab2f3 Refactor node_file.cc to not use Promises.
At the same time implement synchronous wrappers of the POSIX functions.
These will be undocumented until we settle on an API. Works like this

    // returns promise as before
    posix.mkdir("test").addCallback(function () {
      sys.puts("done");
    });

    // returns undefined, executed synchronously.
    posix.mkdirSync("test");
    sys.puts("done");

This refactoring is a step towards allowing promises to be implemented
purely in javascript.
2009-12-06 10:50:03 +01:00

18 lines
294 B
C++

// Copyright 2009 Ryan Dahl <ry@tinyclouds.org>
#ifndef SRC_FILE_H_
#define SRC_FILE_H_
#include <node.h>
#include <node_events.h>
#include <v8.h>
namespace node {
class File {
public:
static void Initialize(v8::Handle<v8::Object> target);
};
} // namespace node
#endif // SRC_FILE_H_