download.proto

 1syntax = "proto3";
 2package zed.messages;
 3
 4import "core.proto";
 5import "worktree.proto";
 6
 7message DownloadFileByPath {
 8  uint64 project_id = 1;
 9  uint64 worktree_id = 2;
10  string path = 3;
11  uint64 file_id = 4;
12}
13
14message DownloadFileResponse {
15  uint64 file_id = 1;
16}
17
18message CreateFileForPeer {
19  uint64 project_id = 1;
20  PeerId peer_id = 2;
21  oneof variant {
22    FileState state = 3;
23    FileChunk chunk = 4;
24  }
25}
26
27message FileState {
28  uint64 id = 1;
29  optional File file = 2;
30  uint64 content_size = 3;
31}
32
33message FileChunk {
34  uint64 file_id = 1;
35  bytes data = 2;
36}