@@ -46,6 +46,7 @@ export enum MessageType {
4646 SHARED_DIRECTORY_WRITE_REQUEST = 21 ,
4747 SHARED_DIRECTORY_WRITE_RESPONSE = 22 ,
4848 SHARED_DIRECTORY_MOVE_REQUEST = 23 ,
49+ SHARED_DIRECTORY_MOVE_RESPONSE = 24 ,
4950 SHARED_DIRECTORY_LIST_REQUEST = 25 ,
5051 SHARED_DIRECTORY_LIST_RESPONSE = 26 ,
5152 __LAST , // utility value
@@ -168,6 +169,12 @@ export type SharedDirectoryMoveRequest = {
168169 newPath : string ;
169170} ;
170171
172+ // | message type (24) | completion_id uint32 | err_code uint32 |
173+ export type SharedDirectoryMoveResponse = {
174+ completionId : number ;
175+ errCode : SharedDirectoryErrCode ;
176+ } ;
177+
171178// | message type (25) | completion_id uint32 | directory_id uint32 | path_length uint32 | path []byte |
172179export type SharedDirectoryListRequest = {
173180 completionId : number ;
@@ -589,6 +596,7 @@ export default class Codec {
589596 return buffer ;
590597 }
591598
599+ // | message type (22) | completion_id uint32 | err_code uint32 | bytes_written uint32 |
592600 encodeSharedDirectoryWriteResponse (
593601 res : SharedDirectoryWriteResponse
594602 ) : Message {
@@ -609,6 +617,23 @@ export default class Codec {
609617 return buffer ;
610618 }
611619
620+ // | message type (24) | completion_id uint32 | err_code uint32 |
621+ encodeSharedDirectoryMoveResponse ( res : SharedDirectoryMoveResponse ) : Message {
622+ const bufLen = byteLength + 2 * uint32Length ;
623+ const buffer = new ArrayBuffer ( bufLen ) ;
624+ const view = new DataView ( buffer ) ;
625+ let offset = 0 ;
626+
627+ view . setUint8 ( offset , MessageType . SHARED_DIRECTORY_MOVE_RESPONSE ) ;
628+ offset += byteLength ;
629+ view . setUint32 ( offset , res . completionId ) ;
630+ offset += uint32Length ;
631+ view . setUint32 ( offset , res . errCode ) ;
632+ offset += uint32Length ;
633+
634+ return buffer ;
635+ }
636+
612637 // | message type (26) | completion_id uint32 | err_code uint32 | fso_list_length uint32 | fso_list fso[] |
613638 encodeSharedDirectoryListResponse ( res : SharedDirectoryListResponse ) : Message {
614639 const bufLenSansFsoList = byteLength + 3 * uint32Length ;
0 commit comments