@@ -20,12 +20,12 @@ var constants = require('constants');
2020 * @constructor
2121 */
2222function VirtualStats ( config ) {
23- for ( var key in config ) {
24- if ( ! config . hasOwnProperty ( key ) ) {
25- continue ;
26- }
27- this [ key ] = config [ key ] ;
28- }
23+ for ( var key in config ) {
24+ if ( ! config . hasOwnProperty ( key ) ) {
25+ continue ;
26+ }
27+ this [ key ] = config [ key ] ;
28+ }
2929}
3030
3131/**
@@ -34,63 +34,56 @@ function VirtualStats(config) {
3434 * @return {boolean } Property matches mode.
3535 */
3636VirtualStats . prototype . _checkModeProperty = function ( property ) {
37- return ( ( this . mode & constants . S_IFMT ) === property ) ;
37+ return ( this . mode & constants . S_IFMT ) === property ;
3838} ;
3939
40-
4140/**
4241 * @return {Boolean } Is a directory.
4342 */
4443VirtualStats . prototype . isDirectory = function ( ) {
45- return this . _checkModeProperty ( constants . S_IFDIR ) ;
44+ return this . _checkModeProperty ( constants . S_IFDIR ) ;
4645} ;
4746
48-
4947/**
5048 * @return {Boolean } Is a regular file.
5149 */
5250VirtualStats . prototype . isFile = function ( ) {
53- return this . _checkModeProperty ( constants . S_IFREG ) ;
51+ return this . _checkModeProperty ( constants . S_IFREG ) ;
5452} ;
5553
56-
5754/**
5855 * @return {Boolean } Is a block device.
5956 */
6057VirtualStats . prototype . isBlockDevice = function ( ) {
61- return this . _checkModeProperty ( constants . S_IFBLK ) ;
58+ return this . _checkModeProperty ( constants . S_IFBLK ) ;
6259} ;
6360
64-
6561/**
6662 * @return {Boolean } Is a character device.
6763 */
6864VirtualStats . prototype . isCharacterDevice = function ( ) {
69- return this . _checkModeProperty ( constants . S_IFCHR ) ;
65+ return this . _checkModeProperty ( constants . S_IFCHR ) ;
7066} ;
7167
72-
7368/**
7469 * @return {Boolean } Is a symbolic link.
7570 */
7671VirtualStats . prototype . isSymbolicLink = function ( ) {
77- return this . _checkModeProperty ( constants . S_IFLNK ) ;
72+ return this . _checkModeProperty ( constants . S_IFLNK ) ;
7873} ;
7974
80-
8175/**
8276 * @return {Boolean } Is a named pipe.
8377 */
8478VirtualStats . prototype . isFIFO = function ( ) {
85- return this . _checkModeProperty ( constants . S_IFIFO ) ;
79+ return this . _checkModeProperty ( constants . S_IFIFO ) ;
8680} ;
8781
88-
8982/**
9083 * @return {Boolean } Is a socket.
9184 */
9285VirtualStats . prototype . isSocket = function ( ) {
93- return this . _checkModeProperty ( constants . S_IFSOCK ) ;
86+ return this . _checkModeProperty ( constants . S_IFSOCK ) ;
9487} ;
9588
9689module . exports = VirtualStats ;
0 commit comments