Skip to content

Fix coping and moving files around using the file tree #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 24, 2019

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Apr 22, 2019

  • Implement write/read buffers in the Electron clipboard fill. This makes copying, cutting, and pasting files in the file tree possible.
  • Implement fs.createReadStream. This is what is used to copy files from one part of the file tree to another (via pipe).
  • Synchronously bind to proxy events. This makes it impossible to miss events. I did this thinking it was causing an issue I had with the piping not working, but it wasn't it. Since I did the work anyway, figured I'd keep it.
  • Make it possible to bind some events on demand. The data event on a stream will make the data start flowing, which is not always desirable. For example if you try to pipe later the data may already be partially or completely gone. Now we can delay binding for an event like data until we're asked.
  • Make it possible to pass a proxy through the protocol as an argument. This is what makes pipe possible.
  • Add an interface for the client-side server proxies, so now we can see that it has a proxyId.
  • Add tests for fs.createReadStream and pipe.
  • Add a bit of documentation for the protocol internals.

This makes cutting and copy files from the file tree work.
This is used by the file tree to copy files.
This makes things like piping streams possible.
This eliminates any chance whatsoever of missing events due to binding
too late.
@code-asher code-asher marked this pull request as ready for review April 23, 2019 19:20
@code-asher code-asher requested a review from kylecarbs as a code owner April 23, 2019 19:20
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Skimming over would probably be good to add a bit of a doc-section on how proxies work.

@code-asher code-asher merged commit c9f91e7 into master Apr 24, 2019
@code-asher code-asher deleted the fix/cut-copy-files branch April 24, 2019 15:38
code-asher added a commit that referenced this pull request Jun 19, 2019
* Implement write/read buffers in electron fill

This makes cutting and copy files from the file tree work.

* Implement fs.createReadStream

This is used by the file tree to copy files.

* Allow passing proxies back from client to server

This makes things like piping streams possible.

* Synchronously bind to proxy events

This eliminates any chance whatsoever of missing events due to binding
too late.

* Make it possible to bind some events on demand

* Add some protocol documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants