You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,8 +110,8 @@ Given a full path, returns the full contents of the file.
110
110
The header is four fixed entries and a variable length path:
111
111
112
112
* Command: Single byte. Always `0x10`.
113
-
* Chunk size: 32-bit number encoding the amount of data that the client can handle in the first reply.
114
113
* Chunk offset: 32-bit number encoding the offset into the file to start the first chunk.
114
+
* Chunk size: 32-bit number encoding the amount of data that the client can handle in the first reply.
115
115
* Path length: 16-bit number encoding the encoded length of the path string.
116
116
* Path: UTF-8 encoded string that is *not* null terminated. (We send the length instead.)
117
117
@@ -126,8 +126,8 @@ The server will respond with:
126
126
If the chunk length is smaller than the total length, then the client will request more data by sending:
127
127
* Command: Single byte. Always `0x12`.
128
128
* Status: Single byte. Always OK for now.
129
-
* Chunk size: 32-bit number encoding the number of bytes to read. May be different than the original size. Does not need to be limited by the total size.
130
129
* Chunk offset: 32-bit number encoding the offset into the file to start the next chunk.
130
+
* Chunk size: 32-bit number encoding the number of bytes to read. May be different than the original size. Does not need to be limited by the total size.
131
131
132
132
The transaction is complete after the server has replied with all data. (No acknowledgement needed from the client.)
133
133
@@ -136,6 +136,8 @@ The transaction is complete after the server has replied with all data. (No ackn
136
136
137
137
Writes the content to the given full path. If the file exists, it will be overwritten. Content may be written as received so an interrupted transfer may lead to a truncated file.
138
138
139
+
Offset larger than the existing file size will introduce zeros into the gap.
140
+
139
141
The header is four fixed entries and a variable length path:
140
142
141
143
* Command: Single byte. Always `0x20`.
@@ -157,7 +159,7 @@ The client will repeatedly respond until the total length has been transferred w
157
159
* Data size: 32-bit number encoding the amount of data the client is sending.
158
160
* Data
159
161
160
-
The transaction is complete after the server has received all data.
162
+
The transaction is complete after the server has received all data and replied with a status with 0 free space and offset set to the content length.
161
163
162
164
163
165
`0x30` - Delete a file or directory
@@ -206,7 +208,7 @@ The server will reply with n+1 entries for a directory with n files:
206
208
* Status: Single byte. `0x01` if the directory exists or `0x02` if it doesn't.
207
209
* Entry number: 32-bit number encoding the entry number.
208
210
* Total entries: 32-bit number encoding the total number of entries.
209
-
* Flags: 8-bit number encoding data about the entries per-bit. Bit
211
+
* Flags: 32-bit number encoding data about the entries.
210
212
* Bit 0: Set when the entry is a directory
211
213
* Bits 1-7: Reserved
212
214
* File size: 32-bit number encoding the size of the file. Ignore for directories. Value may change.
0 commit comments