mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
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.
18 lines
294 B
C++
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_
|