From 3a85eac4ec7ff8a1700ddec21e0177d2f60335ea Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 12 Jan 2015 09:24:30 -0500 Subject: [PATCH] fs: undeprecate exists() and existsSync() fs.exists() and fs.existsSync() were deprecated in #103. This commit removes the deprecation message, in order to stay more in sync with joyent/node for the io.js 1.0.0 release. Fixes: https://github.com/iojs/io.js/issues/257 PR-URL: https://github.com/iojs/io.js/pull/307 Reviewed-By: Ben Noordhuis Reviewed-By: Bert Belder --- lib/fs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index b8dbe832bb639b..b539c23a326540 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -217,7 +217,7 @@ fs.accessSync = function(path, mode) { binding.access(pathModule._makeLong(path), mode); }; -fs.exists = util.deprecate(function(path, callback) { +fs.exists = function(path, callback) { if (!nullCheck(path, cb)) return; var req = new FSReqWrap(); req.oncomplete = cb; @@ -225,9 +225,9 @@ fs.exists = util.deprecate(function(path, callback) { function cb(err, stats) { if (callback) callback(err ? false : true); } -}, 'fs.exists() is deprecated. Use fs.access() instead.'); +}; -fs.existsSync = util.deprecate(function(path) { +fs.existsSync = function(path) { try { nullCheck(path); binding.stat(pathModule._makeLong(path)); @@ -235,7 +235,7 @@ fs.existsSync = util.deprecate(function(path) { } catch (e) { return false; } -}, 'fs.existsSync() is deprecated. Use fs.accessSync() instead.'); +}; fs.readFile = function(path, options, callback_) { var callback = maybeCallback(arguments[arguments.length - 1]);