[minor] Use fs.exists when available

`path.exists*` was moved to `fs` module in
joyent/node@e10ed097cb.
This commit is contained in:
Maciej Małecki 2012-05-15 11:02:46 +02:00
parent 1f67d35305
commit 87b0dd01c9

View file

@ -10,6 +10,7 @@ var fs = require('fs'),
util = require('util'),
formats = require('../formats'),
Memory = require('./memory').Memory,
exists = fs.exists || path.exists,
existsSync = fs.existsSync || path.existsSync;
//
@ -82,7 +83,7 @@ File.prototype.saveSync = function (value) {
File.prototype.load = function (callback) {
var self = this;
path.exists(self.file, function (exists) {
exists(self.file, function (exists) {
if (!exists) {
return callback(null, {});
}