( backend: Option.Option<FileSystem.WatchBackend["Service"]>, path: string, options?: FileSystem.WatchOptions )
| 425 | ) |
| 426 | |
| 427 | const watch = ( |
| 428 | backend: Option.Option<FileSystem.WatchBackend["Service"]>, |
| 429 | path: string, |
| 430 | options?: FileSystem.WatchOptions |
| 431 | ) => |
| 432 | stat(path).pipe( |
| 433 | Effect.map((info) => |
| 434 | backend.pipe( |
| 435 | Option.flatMap((backend) => backend.register(path, info, options)), |
| 436 | Option.getOrElse(() => watchNative(path, options)) |
| 437 | ) |
| 438 | ), |
| 439 | Stream.unwrap |
| 440 | ) |
| 441 | |
| 442 | const writeFile: FileSystem.FileSystem["writeFile"] = (path, data, options) => { |
| 443 | const flag = options?.flag ?? "w" |
nothing calls this directly
no test coverage detected