# scripting tool: Use project buffers in \`io.open\` \(\#26425\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bf11b888c37dda8f446e8ad572c36f475132e9d2)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bf11b888c37dda8f446e8ad572c36f475132e9d2

Requested commit: bf11b888c37dda8f446e8ad572c36f475132e9d2

Commit: bf11b888c37dda8f446e8ad572c36f475132e9d2

Tree: 8348e785ae84822474f6631abd018855e8254504

Author: Agus Zubiaga

Committer: GitHub

## Message

```
scripting tool: Use project buffers in `io.open`  (#26425)

This PR makes `io.open` use our own implementation again, but instead of
the real filesystem, it will now use the project's to check file
metadata and perform read and writes using project buffers.

This also cleans up the `io.open` implementation by splitting it into
multiple methods, adds tests for various File I/O patterns, and fixes a
few bugs in read formats.

Release Notes:

- N/A
```

## Parents

- [d562f58e76f2bf9ed519e253a1b2e2eefb8675f1](https://git.cafe/gitcafe/zed/commit/d562f58e76f2bf9ed519e253a1b2e2eefb8675f1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bf11b888c37dda8f446e8ad572c36f475132e9d2?format=markdown)
