Ftp.PutUniqueFileAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Ftp.dll (version 7.0.9313)
PutUniqueFileAsync(Stream, Object)
Begins asynchronous PutUniqueFile operation. Uploads the content of the stream to the file with unique pathname on the server.
Declaration
public Task<string> PutUniqueFileAsync(Stream sourceStream, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | sourceStream | The source data stream. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<String> | Name of the newly created unique file on the server. |
Remarks
Represents the FTP STOU command.
Use with caution - many servers do not support this and many servers support this incorrectly (MS FTP).
PutUniqueFileAsync(String, Object)
Begins asynchronous PutUniqueFile operation. Uploads the content of the local file to the file with unique pathname on the server.
Declaration
public Task<string> PutUniqueFileAsync(string localPath, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localPath | The path of the local file. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task<String> | Name of the newly created unique file on the server. |
Remarks
Represents the FTP STOU command.
Use with caution - many servers do not support this and many servers support this incorrectly (MS FTP).