# < Summary

Information

Class: | Renci.SshNet.Sftp.Requests.SftpFSetStatRequest
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\Requests\SftpFSetStatRequest.cs

Line coverage
82%

Covered lines: | 24
Uncovered lines: | 5
Coverable lines: | 29
Total lines: | 69
Line coverage: | 82.7%

Branch coverage
100%

Covered branches: | 2
Total branches: | 2
Branch coverage: | 100%

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
get_SftpMessageType() | 100% | 1 | 100%
get_Handle() | 100% | 1 | 100%
get_Attributes() | 100% | 1 | 100%
get_AttributesBytes() | 100% | 2 | 100%
get_BufferCapacity() | 100% | 1 | 100%
.ctor(...) | 100% | 1 | 100%
LoadData() | 100% | 1 | 0%
SaveData() | 100% | 1 | 100%

# File(s)

## \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\Requests\SftpFSetStatRequest.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | `using Renci.SshNet.Sftp.Responses;`
|  | `3` |  | ``
|  | `4` |  | `namespace Renci.SshNet.Sftp.Requests`
|  | `5` |  | `{`
|  | `6` |  | `internal sealed class SftpFSetStatRequest : SftpRequest`
|  | `7` |  | `{`
|  | `8` |  | `private byte[] _attributesBytes;`
|  | `9` |  | ``
|  | `10` |  | `public override SftpMessageTypes SftpMessageType`
|  | `11` |  | `{`
| 30 | `12` |  | `get { return SftpMessageTypes.FSetStat; }`
|  | `13` |  | `}`
|  | `14` |  | ``
| 30 | `15` |  | `public byte[] Handle { get; private set; }`
|  | `16` |  | ``
| 20 | `17` |  | `private SftpFileAttributes Attributes { get; set; }`
|  | `18` |  | ``
|  | `19` |  | `private byte[] AttributesBytes`
|  | `20` |  | `{`
|  | `21` |  | `get`
| 14 | `22` |  | `{`
| 14 | `23` |  | `_attributesBytes ??= Attributes.GetBytes();`
| 14 | `24` |  | `return _attributesBytes;`
| 14 | `25` |  | `}`
|  | `26` |  | `}`
|  | `27` |  | ``
|  | `28` |  | `/// <summary>`
|  | `29` |  | `/// Gets the size of the message in bytes.`
|  | `30` |  | `/// </summary>`
|  | `31` |  | `/// <value>`
|  | `32` |  | `/// The size of the messages in bytes.`
|  | `33` |  | `/// </value>`
|  | `34` |  | `protected override int BufferCapacity`
|  | `35` |  | `{`
|  | `36` |  | `get`
| 7 | `37` |  | `{`
| 7 | `38` |  | `var capacity = base.BufferCapacity;`
| 7 | `39` |  | `capacity += 4; // Handle length`
| 7 | `40` |  | `capacity += Handle.Length; // Handle`
| 7 | `41` |  | `capacity += AttributesBytes.Length; // Attributes`
| 7 | `42` |  | `return capacity;`
| 7 | `43` |  | `}`
|  | `44` |  | `}`
|  | `45` |  | ``
|  | `46` |  | `public SftpFSetStatRequest(uint protocolVersion, uint requestId, byte[] handle, SftpFileAttributes attributes, A`
| 13 | `47` |  | `: base(protocolVersion, requestId, statusAction)`
| 13 | `48` |  | `{`
| 13 | `49` |  | `Handle = handle;`
| 13 | `50` |  | `Attributes = attributes;`
| 13 | `51` |  | `}`
|  | `52` |  | ``
|  | `53` |  | `protected override void LoadData()`
| 0 | `54` |  | `{`
| 0 | `55` |  | `base.LoadData();`
|  | `56` |  | ``
| 0 | `57` |  | `Handle = ReadBinary();`
| 0 | `58` |  | `Attributes = ReadAttributes();`
| 0 | `59` |  | `}`
|  | `60` |  | ``
|  | `61` |  | `protected override void SaveData()`
| 7 | `62` |  | `{`
| 7 | `63` |  | `base.SaveData();`
|  | `64` |  | ``
| 7 | `65` |  | `WriteBinaryString(Handle);`
| 7 | `66` |  | `Write(AttributesBytes);`
| 7 | `67` |  | `}`
|  | `68` |  | `}`
|  | `69` |  | `}`

# Methods/Properties

get_SftpMessageType()
get_Handle()
get_Attributes()
get_AttributesBytes()
get_BufferCapacity()
.ctor(System.UInt32,System.UInt32,System.Byte[],Renci.SshNet.Sftp.SftpFileAttributes,System.Action`1<Renci.SshNet.Sftp.Responses.SftpStatusResponse>)
LoadData()
SaveData()