Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added fs module

  • Loading branch information...
commit f89095c5af8a731a53716d5917e9c815e805ca32 1 parent 1591de9
@nelsonsilva authored
Showing with 34 additions and 1 deletion.
  1. +3 −1 lib/process.js
  2. +31 −0 modules/fs.js
View
4 lib/process.js
@@ -4,5 +4,7 @@ this.process = {
return vertx.setTimer(0, fn);
},
- env: {}
+ env: {},
+
+ on: function(event, handler){}
};
View
31 modules/fs.js
@@ -0,0 +1,31 @@
+exports.readFileSync = function(filename, encoding) {
+ vertx.fileSystem.readFileSync(filename);
+}
+
+exports.readFile = function(filename, handler) {
+ vertx.fileSystem.readFile(filename, handler);
+}
+
+/* TODO
+vertx.fileSystem.copy(source, destination, handler)
+vertx.fileSystem.move(source, destination, handler);
+vertx.fileSystem.truncate(file, len, handler);
+vertx.fileSystem.chmod(file, perms, handler);
+vertx.fileSystem.props(file, handler);
+vertx.fileSystem.lprops(file, handler);
+vertx.fileSystem.link(link, existing, handler);
+vertx.fileSystem.symlink(link, existing, handler);
+vertx.fileSystem.unlink(link, handler);
+vertx.fileSystem.readSymLink(link, handler);
+vertx.fileSystem.delete(file, handler);
+vertx.fileSystem.mkdir(dirname, handler);
+vertx.fileSystem.readDir(dirName, filter);
+vertx.fileSystem.readFile(file);
+vertx.fileSystem.writeFile(file, data, handler);
+vertx.fileSystem.createFile(file, handler);
+vertx.fileSystem.exists(file, handler);
+vertx.fileSystem.fsProps(file, handler);
+vertx.fileSystem.open(file, openFlags, handler);
+*/
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.