|
@@ -243,22 +243,6 @@ namespace Renci.SshNet
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /// <summary>
|
|
|
|
|
- /// Uploads the <see cref="FileSystemInfo.LastWriteTimeUtc"/> and <see cref="FileSystemInfo.LastAccessTimeUtc"/>
|
|
|
|
|
- /// of the next file or directory to upload.
|
|
|
|
|
- /// </summary>
|
|
|
|
|
- /// <param name="channel">The channel to perform the upload in.</param>
|
|
|
|
|
- /// <param name="input">A <see cref="Stream"/> from which any feedback from the server can be read.</param>
|
|
|
|
|
- /// <param name="fileOrDirectory">The file or directory to upload.</param>
|
|
|
|
|
- private void UploadTimes(IChannelSession channel, Stream input, FileSystemInfo fileOrDirectory)
|
|
|
|
|
- {
|
|
|
|
|
- var zeroTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
|
|
|
|
|
- var modificationSeconds = (long) (fileOrDirectory.LastWriteTimeUtc - zeroTime).TotalSeconds;
|
|
|
|
|
- var accessSeconds = (long) (fileOrDirectory.LastAccessTimeUtc - zeroTime).TotalSeconds;
|
|
|
|
|
- SendData(channel, string.Format("T{0} 0 {1} 0\n", modificationSeconds, accessSeconds));
|
|
|
|
|
- CheckReturnCode(input);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Sets mode, size and name of file being upload.
|
|
/// Sets mode, size and name of file being upload.
|
|
|
/// </summary>
|
|
/// </summary>
|