Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-06-21 22:42:33 +0400
committerisaacs <i@izs.me>2012-06-21 23:05:33 +0400
commit5b39929d47f962fccafb4116f3c177ddc4fd3269 (patch)
tree7380f2e1b3a03b7a5b5483236465b1c05c486d86 /lib/path.js
parent260695afd07067254a704c050243d2e619bae8b7 (diff)
Add --no-deprecation and --trace-deprecation flags
Diffstat (limited to 'lib/path.js')
-rw-r--r--lib/path.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/path.js b/lib/path.js
index 961dc400a53..438b05d8ef6 100644
--- a/lib/path.js
+++ b/lib/path.js
@@ -21,7 +21,7 @@
var isWindows = process.platform === 'win32';
-var _deprecationWarning = require('util')._deprecationWarning;
+var util = require('util');
// resolves . and .. elements in a path array with directory names there
@@ -415,16 +415,14 @@ exports.extname = function(path) {
};
-exports.exists = function(path, callback) {
+exports.exists = util.deprecate(function(path, callback) {
require('fs').exists(path, callback);
-};
-module.deprecate('exists', 'It is now called `fs.exists`.');
+}, 'path.exists is now called `fs.exists`.');
-exports.existsSync = function(path) {
+exports.existsSync = util.deprecate(function(path) {
return require('fs').existsSync(path);
-};
-module.deprecate('existsSync', 'It is now called `fs.existsSync`.');
+}, 'path.existsSync is now called `fs.existsSync`.');
if (isWindows) {