Resolves issue #112, though isBlockDevice(), isCharacterDevice(), isFIFO(), and isSocket() currently lack constants, hence return false.
This commit is contained in:
parent
7d6bd98a31
commit
1dc325556a
28
src/fs.js
28
src/fs.js
|
@ -126,6 +126,34 @@ define(function(require) {
|
||||||
this.mtime = fileNode.mtime;
|
this.mtime = fileNode.mtime;
|
||||||
this.ctime = fileNode.ctime;
|
this.ctime = fileNode.ctime;
|
||||||
this.type = fileNode.mode;
|
this.type = fileNode.mode;
|
||||||
|
|
||||||
|
function isFile() {
|
||||||
|
return (this.type === constants.MODE_FILE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isDirectory() {
|
||||||
|
return (this.type === constants.MODE_DIRECTORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBlockDevice() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isCharacterDevice() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isSymbolicLink() {
|
||||||
|
return (this.type === constants.MODE_SYMBOLIC_LINK);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isFIFO() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isSocket() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue