modularize init script

This commit is contained in:
hyb1996
2017-05-09 15:47:31 +08:00
parent 08654b8f90
commit 956f064737
28 changed files with 451 additions and 667 deletions

View File

@@ -0,0 +1,15 @@
module.exports = function(__runtime__, scope){
scope.open = function(path, mode, encoding, bufferSize){
if(arguments.length == 1){
return com.stardust.pio.PFile.open(path);
}else if(arguments.length == 2){
return com.stardust.pio.PFile.open(path, mode);
}else if(arguments.length == 3){
return com.stardust.pio.PFile.open(path, mode, encoding);
}else if(arguments.length == 4){
return com.stardust.pio.PFile.open(path, mode, encoding, bufferSize);
}
};
}