diff options
author | isaacs <i@izs.me> | 2012-06-21 22:42:33 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-06-21 23:05:33 +0400 |
commit | 5b39929d47f962fccafb4116f3c177ddc4fd3269 (patch) | |
tree | 7380f2e1b3a03b7a5b5483236465b1c05c486d86 /lib/path.js | |
parent | 260695afd07067254a704c050243d2e619bae8b7 (diff) |
Add --no-deprecation and --trace-deprecation flags
Diffstat (limited to 'lib/path.js')
-rw-r--r-- | lib/path.js | 12 |
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) { |