CB-9782 Implements PlatformApi contract for Android platform.

This closes #226
This commit is contained in:
Vladimir Kotikov
2015-10-20 10:30:31 +03:00
parent 789c505a88
commit 400282282f
131 changed files with 9482 additions and 3048 deletions
+19
View File
@@ -0,0 +1,19 @@
var fs = require('fs');
var common = require('./common');
//@
//@ ### cd('dir')
//@ Changes to directory `dir` for the duration of the script
function _cd(options, dir) {
if (!dir)
common.error('directory not specified');
if (!fs.existsSync(dir))
common.error('no such file or directory: ' + dir);
if (!fs.statSync(dir).isDirectory())
common.error('not a directory: ' + dir);
process.chdir(dir);
}
module.exports = _cd;