public MoveTo ( string destFileName ) : void | ||
destFileName | string | The path to move the file to, which can specify a different file name. |
Résultat | void |
public void MoveTo(string destFileName)
{
if (destFileName == null)
throw new ArgumentNullException("destFileName");
_sftpSession.RequestRename(FullName, destFileName);
var fullPath = _sftpSession.GetCanonicalPath(destFileName);
Name = fullPath.Substring(fullPath.LastIndexOf('/') + 1);
FullName = fullPath;
}
public void MoveToTest() { SftpSession sftpSession = null; // TODO: Initialize to an appropriate value string fullName = string.Empty; // TODO: Initialize to an appropriate value SftpFileAttributes attributes = null; // TODO: Initialize to an appropriate value SftpFile target = new SftpFile(sftpSession, fullName, attributes); // TODO: Initialize to an appropriate value string destFileName = string.Empty; // TODO: Initialize to an appropriate value target.MoveTo(destFileName); Assert.Inconclusive("A method that does not return a value cannot be verified."); }