Differences
This shows you the differences between the selected revisions of the page.
library_session_putfiletodirectory 2020-08-21 | library_session_putfiletodirectory 2024-01-05 (current) | ||
Line 25: | Line 25: | ||
==== Parameters ==== | ==== Parameters ==== | ||
^ Name ^ Description ^ | ^ Name ^ Description ^ | ||
- | | string ==localFilePath== | Full path to the remote file to upload. | | + | | string ==localFilePath== | Full path to the local file to upload. | |
| string ==remoteDirectory == | Full path to the remote directory to upload the file to. | | | string ==remoteDirectory == | Full path to the remote directory to upload the file to. | | ||
| bool ==remove== | When set to ''true'', deletes the source local file(s) after a successful transfer. Defaults to ''false''. | | | bool ==remove== | When set to ''true'', deletes the source local file(s) after a successful transfer. Defaults to ''false''. | | ||
Line 41: | Line 41: | ||
| TimeoutException | Timeout waiting for ''winscp.com'' to respond. | | | TimeoutException | Timeout waiting for ''winscp.com'' to respond. | | ||
- | ===== Remarks ===== | + | ===== [[remarks]] Remarks ===== |
- | Event ''[[library_session_filetransferred|Session.FileTransferred]]'' is raised. | + | Event ''[[library_session_filetransferred|Session.FileTransferred]]'' is raised. Also raises [[library_session_filetransferprogress|''Session.FileTransferProgress'']] throughout the transfer. |
Contrary to [[library_session_putfiles|''Session.PutFiles'']]: | Contrary to [[library_session_putfiles|''Session.PutFiles'']]: | ||
- | * You specify a path to the source file, not a [[library_wildcard|wildcard]], so you do not need to escape a literal file name. | ||
* You do not specify a target name (or an operation mask) in the destination path (original names are preserved when uploading). | * You do not specify a target name (or an operation mask) in the destination path (original names are preserved when uploading). | ||
* You do not need to make sure that the target directory path ends with a slash. | * You do not need to make sure that the target directory path ends with a slash. | ||
- | * The method upload files only. It throws when the source path points to a directory. | + | * The method uploads files only. It throws when the source path points to a directory. |
* The method throws an exception on error automatically. No need to [[library_session#results|call ''OperationResultBase.Check'']]. | * The method throws an exception on error automatically. No need to [[library_session#results|call ''OperationResultBase.Check'']]. | ||
Line 56: | Line 55: | ||
==== Real-Life Examples ==== | ==== Real-Life Examples ==== | ||
- | * [[library_example_zip_and_upload|Pack files to ZIP archive and upload it]]. | + | * [[library_example_zip_and_upload|*]]. |