Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions proto/files.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ message RemoteFileEntryInfo {
RemoteFileEntryKind kind = 3;
uint64 size = 4;
int64 modified_at_ms = 5;
// The revision changes when the entry content or metadata changes.
string revision = 6;
// The ID stays stable when the entry is renamed within the share.
string id = 7;
}

message RemoteFileListSharesRequest {}
Expand Down Expand Up @@ -135,6 +139,14 @@ message RemoteFileConditionalUploadRequest {
string expected_revision = 5;
}

// A long-poll cursor for changes to a shared folder. A new epoch means the
// caller must reconcile its previously enumerated directories before waiting.
message RemoteFileWatchChangesRequest {
string share_id = 1;
string epoch = 2;
uint64 after_sequence = 3;
}

message RemoteFileRequestFrame {
oneof body {
RemoteFileListSharesRequest list_shares = 10;
Expand All @@ -150,6 +162,7 @@ message RemoteFileRequestFrame {
RemoteFileReadRangeRequest read_range = 20;
RemoteFileConditionalUploadRequest conditional_upload = 21;
RemoteFileConditionalDeleteRequest conditional_delete = 22;
RemoteFileWatchChangesRequest watch_changes = 23;
}
}

Expand All @@ -165,6 +178,11 @@ message RemoteFileResponseFrame {
optional RemoteFileErrorCode error_code = 9;
string revision = 10;
bytes range_data = 11;
string change_epoch = 12;
// Sequence numbers are scoped to change_epoch.
uint64 change_sequence = 13;
repeated string changed_directories = 14;
bool change_reset = 15;
}

enum RemoteFileErrorCode {
Expand Down
Loading