tschaub / mock-fs

Configurable mock for the fs module
https://npmjs.org/package/mock-fs
Other
906 stars 85 forks source link

fix: fix isRead check on file descriptor #289

Closed 3cp closed 4 years ago

3cp commented 4 years ago

The argument flags must include one of the following access modes: O_RDONLY, O_WRONLY, or O_RDWR. These request opening the file read- only, write-only, or read/write, respectively. O_RDONLY is 0, O_WRONLY is 1, O_RDWR is 2, the flags use 2 bits for 3 states: 0 (0b00) / 1 (0b01) / 2 (0b10), the 2 bits will never be 3 (0b11).

closes #288

tschaub commented 4 years ago

Thanks, @3cp. Apologies for the delay (and the need to rebase to get #296).

3cp commented 4 years ago

Passed checks.