( path: string, shouldPathExist: Primitive.Primitive.PathExists, pathExists: boolean )
| 496 | ) |
| 497 | |
| 498 | const validatePathExistence = ( |
| 499 | path: string, |
| 500 | shouldPathExist: Primitive.Primitive.PathExists, |
| 501 | pathExists: boolean |
| 502 | ): Effect.Effect<void, string> => { |
| 503 | if (shouldPathExist === "no" && pathExists) { |
| 504 | return Effect.fail(`Path '${path}' must not exist`) |
| 505 | } |
| 506 | if (shouldPathExist === "yes" && !pathExists) { |
| 507 | return Effect.fail(`Path '${path}' must exist`) |
| 508 | } |
| 509 | return Effect.void |
| 510 | } |
| 511 | |
| 512 | const validatePathType = ( |
| 513 | path: string, |
no test coverage detected