protected override byte[] CreateHttpContent() { using (var stream = new RequestBodyStream()) { stream.WritePu16((byte)Operation.AddFile); stream.WritePu16(Revision); stream.WriteString(_fullPath); stream.WritePu64(_size); stream.WritePu64(_dateTime.ToUnix()); stream.WritePu32(00); stream.Write(_hash); long mask = ConflictResolver.Rename == _conflictResolver // 1 = overwrite, 55 = don't add if not changed, add with rename if changed ? 55 : 1; stream.WritePu32(mask); if ((mask & 32) != 0) { stream.Write(_hash); stream.WritePu64(_size); } var body = stream.GetBytes(); return(body); } }
protected override byte[] CreateHttpContent() { using (var stream = new RequestBodyStream()) { stream.WritePu16((byte)Operation.Rename); stream.WritePu32(00); // old revision stream.WriteString(_fromPath); stream.WritePu32(00); // new revision stream.WriteString(_toPath); stream.WritePu32(00); //dunno var body = stream.GetBytes(); return(body); } }
protected override byte[] CreateHttpContent() { using (var stream = new RequestBodyStream()) { stream.WritePu16((byte)Operation.CreateFolder); stream.WritePu16(Revision); stream.WriteString(_fullPath); stream.WritePu32(0); var body = stream.GetBytes(); return(body); } }
protected override byte[] CreateHttpContent() { using (var stream = new RequestBodyStream()) { stream.WritePu16((byte)Operation.FolderList); stream.WriteString(_fullPath); stream.WritePu32(Depth); stream.WritePu32((int)Options); stream.WriteWithLength(new byte[0]); var body = stream.GetBytes(); return(body); } }