@@ -20,12 +20,12 @@ var constants = require('constants');
20
20
* @constructor
21
21
*/
22
22
function 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
+ }
29
29
}
30
30
31
31
/**
@@ -34,63 +34,56 @@ function VirtualStats(config) {
34
34
* @return {boolean } Property matches mode.
35
35
*/
36
36
VirtualStats . prototype . _checkModeProperty = function ( property ) {
37
- return ( ( this . mode & constants . S_IFMT ) === property ) ;
37
+ return ( this . mode & constants . S_IFMT ) === property ;
38
38
} ;
39
39
40
-
41
40
/**
42
41
* @return {Boolean } Is a directory.
43
42
*/
44
43
VirtualStats . prototype . isDirectory = function ( ) {
45
- return this . _checkModeProperty ( constants . S_IFDIR ) ;
44
+ return this . _checkModeProperty ( constants . S_IFDIR ) ;
46
45
} ;
47
46
48
-
49
47
/**
50
48
* @return {Boolean } Is a regular file.
51
49
*/
52
50
VirtualStats . prototype . isFile = function ( ) {
53
- return this . _checkModeProperty ( constants . S_IFREG ) ;
51
+ return this . _checkModeProperty ( constants . S_IFREG ) ;
54
52
} ;
55
53
56
-
57
54
/**
58
55
* @return {Boolean } Is a block device.
59
56
*/
60
57
VirtualStats . prototype . isBlockDevice = function ( ) {
61
- return this . _checkModeProperty ( constants . S_IFBLK ) ;
58
+ return this . _checkModeProperty ( constants . S_IFBLK ) ;
62
59
} ;
63
60
64
-
65
61
/**
66
62
* @return {Boolean } Is a character device.
67
63
*/
68
64
VirtualStats . prototype . isCharacterDevice = function ( ) {
69
- return this . _checkModeProperty ( constants . S_IFCHR ) ;
65
+ return this . _checkModeProperty ( constants . S_IFCHR ) ;
70
66
} ;
71
67
72
-
73
68
/**
74
69
* @return {Boolean } Is a symbolic link.
75
70
*/
76
71
VirtualStats . prototype . isSymbolicLink = function ( ) {
77
- return this . _checkModeProperty ( constants . S_IFLNK ) ;
72
+ return this . _checkModeProperty ( constants . S_IFLNK ) ;
78
73
} ;
79
74
80
-
81
75
/**
82
76
* @return {Boolean } Is a named pipe.
83
77
*/
84
78
VirtualStats . prototype . isFIFO = function ( ) {
85
- return this . _checkModeProperty ( constants . S_IFIFO ) ;
79
+ return this . _checkModeProperty ( constants . S_IFIFO ) ;
86
80
} ;
87
81
88
-
89
82
/**
90
83
* @return {Boolean } Is a socket.
91
84
*/
92
85
VirtualStats . prototype . isSocket = function ( ) {
93
- return this . _checkModeProperty ( constants . S_IFSOCK ) ;
86
+ return this . _checkModeProperty ( constants . S_IFSOCK ) ;
94
87
} ;
95
88
96
89
module . exports = VirtualStats ;
0 commit comments