Permalink
Browse files

[fix] fs.existsSync was moved to fs.existsSync

  • Loading branch information...
jfhbrook committed Jul 7, 2012
1 parent 669dd95 commit 6f12712e4d4a446da50177a5a1ef7366e7700b89
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/dryice/index.js
View
@@ -598,18 +598,18 @@ copy.ValueDestination.prototype.processSource = function(source) {
* Check to see if fullPath refers to a directory
*/
copy.isDirectory = function(fullPath) {
- return path.existsSync(fullPath) && fs.statSync(fullPath).isDirectory();
+ return fs.existsSync(fullPath) && fs.statSync(fullPath).isDirectory();
};
copy._writeToFile = function(filename, data, encoding) {
- if (path.existsSync(filename)) {
+ if (fs.existsSync(filename)) {
if (!fs.statSync(filename).isFile()) {
throw new Error('Refusing to remove non file: ' + filename);
}
fs.unlinkSync(filename);
}
var parent = path.dirname(filename);
- if (!path.existsSync(parent)) {
+ if (!fs.existsSync(parent)) {
copy.mkdirSync(parent, 0755);
}
fs.writeFileSync(filename, data, encoding);
@@ -623,10 +623,10 @@ copy.mkdirSync = function(dirname, mode) {
return;
}
var parent = path.dirname(dirname);
- if (!path.existsSync(parent)) {
+ if (!fs.existsSync(parent)) {
copy.mkdirSync(parent, mode);
}
- if (!path.existsSync(dirname)) {
+ if (!fs.existsSync(dirname)) {
fs.mkdirSync(dirname, mode);
}
};
@@ -1153,7 +1153,7 @@ copy.filter.moduleDefines.onRead = true;
* exists()?
*/
function isFile(fullPath) {
- return path.existsSync(fullPath) && fs.statSync(fullPath).isFile();
+ return fs.existsSync(fullPath) && fs.statSync(fullPath).isFile();
}
/**

0 comments on commit 6f12712

Please sign in to comment.