You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,9 +57,9 @@ Create a factory for new files. Supported properties:
57
57
***mode** - `number` File mode (permission and sticky bits). Defaults to `0666`.
58
58
***uid** - `number` The user id. Defaults to `process.getuid()`.
59
59
***git** - `number` The group id. Defaults to `process.getgid()`.
60
-
***atime** - `Date` The last file access time. Defaults to `Date.now()`. Updated when file contents are accessed.
61
-
***ctime** - `Date` The last file change time. Defaults to `Date.now()`. Updated when file owner or permissions change.
62
-
***mtime** - `Date` The last file modification time. Defaults to `Date.now()`. Updated when file contents change.
60
+
***atime** - `Date` The last file access time. Defaults to `new Date()`. Updated when file contents are accessed.
61
+
***ctime** - `Date` The last file change time. Defaults to `new Date()`. Updated when file owner or permissions change.
62
+
***mtime** - `Date` The last file modification time. Defaults to `new Date()`. Updated when file contents change.
63
63
64
64
To create a mock filesystem with a very old file named `foo`, you could do something like this:
65
65
```js
@@ -101,9 +101,9 @@ Create a factory for new directories. Supported properties:
101
101
***mode** - `number` Directory mode (permission and sticky bits). Defaults to `0777`.
102
102
***uid** - `number` The user id. Defaults to `process.getuid()`.
103
103
***git** - `number` The group id. Defaults to `process.getgid()`.
104
-
***atime** - `Date` The last directory access time. Defaults to `Date.now()`.
105
-
***ctime** - `Date` The last directory change time. Defaults to `Date.now()`. Updated when owner or permissions change.
106
-
***mtime** - `Date` The last directory modification time. Defaults to `Date.now()`.
104
+
***atime** - `Date` The last directory access time. Defaults to `new Date()`.
105
+
***ctime** - `Date` The last directory change time. Defaults to `new Date()`. Updated when owner or permissions change.
106
+
***mtime** - `Date` The last directory modification time. Defaults to `new Date()`. Updated when an item is added, removed, or renamed.
107
107
***items** - `Object` Directory contents. Members will generate additional files, directories, or symlinks.
108
108
109
109
To create a mock filesystem with a directory with the relative path `some/dir` that has a mode of `0755` and a couple child files, you could do something like this:
@@ -133,9 +133,9 @@ Create a factory for new symlinks. Supported properties:
133
133
***mode** - `number` Symlink mode (permission and sticky bits). Defaults to `0666`.
134
134
***uid** - `number` The user id. Defaults to `process.getuid()`.
135
135
***git** - `number` The group id. Defaults to `process.getgid()`.
136
-
***atime** - `Date` The last symlink access time. Defaults to `Date.now()`.
137
-
***ctime** - `Date` The last symlink change time. Defaults to `Date.now()`.
138
-
***mtime** - `Date` The last symlink modification time. Defaults to `Date.now()`.
136
+
***atime** - `Date` The last symlink access time. Defaults to `new Date()`.
137
+
***ctime** - `Date` The last symlink change time. Defaults to `new Date()`.
138
+
***mtime** - `Date` The last symlink modification time. Defaults to `new Date()`.
139
139
140
140
To create a mock filesystem with a file and a symlink, you could do something like this:
0 commit comments