Skip to content

Commit

Permalink
Removes fs.workingDirectory(), fixes #393
Browse files Browse the repository at this point in the history
  • Loading branch information
botic committed Feb 26, 2019
1 parent 284bb9c commit 8f9f38b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 44 deletions.
14 changes: 0 additions & 14 deletions modules/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export('absolute',
'split',
// previously in fs-base
'canonical',
'changeWorkingDirectory',
'workingDirectory',
'exists',
'isDirectory',
Expand Down Expand Up @@ -755,19 +754,6 @@ function workingDirectory() {
return resolvePath(java.lang.System.getProperty('user.dir')) + SEPARATOR;
}

/**
* <strong>Using changeWorkingDirectory() throws an exception and logs an error.</strong>
* @param {String} path the new working directory
* @deprecated The working directory is always related to the JVM process.
* Therefore, the working directory cannot be changed during runtime.
* This function is deprecated and may be removed in future versions of RingoJS.
* @see https://github.com/ringo/ringojs/issues/305
*/
function changeWorkingDirectory(path) {
log.error("fs.changeWorkingDirectory() has been removed! https://github.com/ringo/ringojs/issues/305");
throw new Error("fs.changeWorkingDirectory() has been removed!");
}

/**
* Remove a file or directory identified by `path`. Throws an error if
* `path` is a directory and not empty.
Expand Down
3 changes: 1 addition & 2 deletions test/file/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ exports.test_relative = require("./test-fs-relative");
exports.test_resolve = require("./test-fs-resolve");
exports.test_sameFilesystem = require("./test-fs-sameFilesystem");
exports.test_touch = require("./test-fs-touch");
exports.test_workingDirectory = require("./test-fs-workingDirectory");

if (require.main === module) {
require('system').exit(require("test").run(module.id));
}
}
28 changes: 0 additions & 28 deletions test/file/test-fs-workingDirectory.js

This file was deleted.

0 comments on commit 8f9f38b

Please sign in to comment.