api: threads, files

This commit is contained in:
hyb1996
2017-12-27 16:47:32 +08:00
parent 25e9c90bf4
commit 729958d419
26 changed files with 652 additions and 339 deletions

View File

@@ -1,6 +1,9 @@
module.exports = function(__runtime__, scope){
var files = com.stardust.pio.PFiles;
var files = Object.create(com.stardust.pio.PFiles);
files.cwd = function(){
return scope.engines.myEngine().cwd();
}
scope.files = files;
scope.open = function(path, mode, encoding, bufferSize){
if(arguments.length == 1){