Opens the specified file to be appended to
Namespace: System.Net.FtpClient
Assembly: System.Net.FtpClient (in System.Net.FtpClient.dll) Version: 1.0.5064.17461
Syntax
C# |
---|
public virtual Stream OpenAppend(
string path,
FtpDataType type
) |
Visual Basic |
---|
Public Overridable Function OpenAppend (
path As String,
type As FtpDataType
) As Stream |
Visual C++ |
---|
public:
virtual Stream^ OpenAppend(
String^ path,
FtpDataType type
) |
Return Value
Type:
StreamA stream for writing to the file on the server
Implements
IFtpClient..::..OpenAppend(String, FtpDataType)
Examples
C# |
Copy
|
using System;
using System.IO;
using System.Net;
using System.Net.FtpClient;
namespace Examples {
public class OpenAppendExample {
public static void OpenAppend() {
using (FtpClient conn = new FtpClient()) {
conn.Host = "localhost";
conn.Credentials = new NetworkCredential("ftptest", "ftptest");
using (Stream ostream = conn.OpenAppend("/full/or/relative/path/to/file")) {
try {
}
finally {
ostream.Close();
}
}
}
}
}
}
|
See Also