Table of Contents

Property PreserveFileAttributes

Namespace
Tamir.SharpSsh
Assembly
SLSSH.dll

PreserveFileAttributes

Gets or sets a value indicating whether to preserve file attributes.

public bool PreserveFileAttributes { get; set; }

Property Value

bool

true if the p switch is enabled (preserving modification times, access times, and modes from the original file.); otherwise, false.

Examples

The following example translates to: scp -t remotefilepath

Scp scp = new Scp("host", "user", "password");
scp.PreserveFileAttributes = false;
scp.To("localfilepath", "remotefilepath");

The following example translates to: scp -t -p remotefilepath

Scp scp = new Scp("host", "user", "password");
scp.PreserveFileAttributes = true;
scp.To("localfilepath", "remotefilepath");

Remarks

When uploading a file using the To method, by default, the -p switch is used ('Preserves modification times, access times, and modes from the original file.').

This property allows to enable or disable this switch.

Feature introduced in DataMiner 9.5.3 (RN 15080).