# < Summary

Information

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

Line coverage
100%

Covered lines: | 22
Uncovered lines: | 0
Coverable lines: | 22
Total lines: | 57
Line coverage: | 100%

Branch coverage
N/A

Covered branches: | 0
Total branches: | 0
Branch coverage: | N/A

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
get_OldPath() | 100% | 1 | 100%
set_OldPath(...) | 100% | 1 | 100%
get_NewPath() | 100% | 1 | 100%
set_NewPath(...) | 100% | 1 | 100%
get_BufferCapacity() | 100% | 1 | 100%
.ctor(...) | 100% | 1 | 100%
SaveData() | 100% | 1 | 100%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | ``
|  | `3` |  | `using Renci.SshNet.Sftp.Responses;`
|  | `4` |  | ``
|  | `5` |  | `namespace Renci.SshNet.Sftp.Requests`
|  | `6` |  | `{`
|  | `7` |  | `internal sealed class HardLinkRequest : SftpExtendedRequest`
|  | `8` |  | `{`
|  | `9` |  | `private byte[] _oldPath;`
|  | `10` |  | `private byte[] _newPath;`
|  | `11` |  | ``
|  | `12` |  | `public string OldPath`
|  | `13` |  | `{`
| 9 | `14` |  | `get { return Utf8.GetString(_oldPath, 0, _oldPath.Length); }`
| 27 | `15` |  | `private set { _oldPath = Utf8.GetBytes(value); }`
|  | `16` |  | `}`
|  | `17` |  | ``
|  | `18` |  | `public string NewPath`
|  | `19` |  | `{`
| 9 | `20` |  | `get { return Utf8.GetString(_newPath, 0, _newPath.Length); }`
| 27 | `21` |  | `private set { _newPath = Utf8.GetBytes(value); }`
|  | `22` |  | `}`
|  | `23` |  | ``
|  | `24` |  | `/// <summary>`
|  | `25` |  | `/// Gets the size of the message in bytes.`
|  | `26` |  | `/// </summary>`
|  | `27` |  | `/// <value>`
|  | `28` |  | `/// The size of the messages in bytes.`
|  | `29` |  | `/// </value>`
|  | `30` |  | `protected override int BufferCapacity`
|  | `31` |  | `{`
|  | `32` |  | `get`
| 3 | `33` |  | `{`
| 3 | `34` |  | `var capacity = base.BufferCapacity;`
| 3 | `35` |  | `capacity += 4; // OldPath length`
| 3 | `36` |  | `capacity += _oldPath.Length; // OldPath`
| 3 | `37` |  | `capacity += 4; // NewPath length`
| 3 | `38` |  | `capacity += _newPath.Length; // NewPath`
| 3 | `39` |  | `return capacity;`
| 3 | `40` |  | `}`
|  | `41` |  | `}`
|  | `42` |  | ``
|  | `43` |  | `public HardLinkRequest(uint protocolVersion, uint requestId, string oldPath, string newPath, Action<SftpStatusRe`
| 9 | `44` |  | `: base(protocolVersion, requestId, statusAction, "hardlink@openssh.com")`
| 9 | `45` |  | `{`
| 9 | `46` |  | `OldPath = oldPath;`
| 9 | `47` |  | `NewPath = newPath;`
| 9 | `48` |  | `}`
|  | `49` |  | ``
|  | `50` |  | `protected override void SaveData()`
| 3 | `51` |  | `{`
| 3 | `52` |  | `base.SaveData();`
| 3 | `53` |  | `WriteBinaryString(_oldPath);`
| 3 | `54` |  | `WriteBinaryString(_newPath);`
| 3 | `55` |  | `}`
|  | `56` |  | `}`
|  | `57` |  | `}`

# Methods/Properties

get_OldPath()
set_OldPath(System.String)
get_NewPath()
set_NewPath(System.String)
get_BufferCapacity()
.ctor(System.UInt32,System.UInt32,System.String,System.String,System.Action`1<Renci.SshNet.Sftp.Responses.SftpStatusResponse>)
SaveData()