The following tables list the members exposed by Scp.

      Public Constructors

      NameDescription
      Public ConstructorsScp ConstructorOverloaded. Initializes a new instance of the class.
      Top

      Public Properties

      NameDescription
      Public PropertiesStatic MemberBytesPerSecondUpdateIntervalGets or sets the number of milliseconds to update the BytesPerSecond property. The default value is 400 ms. (Inherited from FileSystem)
      Public PropertiesConfigGets or sets SCP settings.
      Public PropertiesConnectionGets the SSH session used by this SFTP session.
      Public PropertiesDirectorySeparatorsOverridden. Gets an array containing the characters that are directory separators.
      Public PropertiesEncodingGets or sets the Encoding that is used to encode commands sent to the server, and decode replies from the server.
      Public PropertiesEncounteredFatalErrorGets a boolean value indicating whether the client object has encountered a fatal error.
      Public PropertiesFileInfoPartsToGetBeforeTransferringSpecifies which information of the source file will be obtained before transferring. (Inherited from FileSystem)
      Public PropertiesHostKeyGets the server public key fingerprint.
      Public PropertiesInvalidFileNameCharsGets or sets an array containing the characters that are not allowed in file or directory names, or null if this file system accepts all characters in file name. (Inherited from FileSystem)
      Public PropertiesInvalidFileNameCharsSubstitutionGets or sets the substitution character that will replace the invalid characters found in file or directory name while copying files from another file system. (Inherited from FileSystem)
      Public PropertiesInvalidPathCharsOverridden. Gets an array containing the characters that are not allowed in path names.
      Public PropertiesInvokeFromCurrentThreadsGets a value indicating whether to raise events from the current thread or to use a SynchronizationContext object available when an asynchronous operation was started. The default value is false. (Inherited from FileSystem)
      Public PropertiesIsAuthenticatedGets a value indicating whether the user is authenticated.
      Public PropertiesIsBusyGets a boolean value indicating whether there are any operations in progress.
      Public PropertiesIsConnectedGets a boolean value indicating whether the connection is established.
      Public PropertiesLocalEndPointGets the local client EndPoint.
      Public PropertiesPathNormalizationGets or sets a boolean value indicating whether to normalize path before any file or directory operation. The default value is true.
      Public PropertiesProgressIntervalGets or sets the length of the interval in milliseconds between the Progress events fired during transfer. The default value is 100 ms. (Inherited from FileSystem)
      Public PropertiesProxyGets or sets the network proxy to use to access a remote server.
      Public PropertiesReconnectionFailureDelayGets or sets the delay in milliseconds between failed login attempts for reconnection.
      Public PropertiesReconnectionMaxRetriesGets or sets the maximum number of retries for reconnection.
      Public PropertiesRemoteEndPointGets the remote server EndPoint.
      Public PropertiesRestoreFilePropertiesGets or sets a boolean value indicating whether to restore file properties including LastWriteTime and CreationTime after downloading or uploading if possible. (Inherited from FileSystem)
      Public PropertiesServerBrandGets the server brand.
      Public PropertiesServerIdGets the server Id (welcome message) returned after a successful connection.
      Public PropertiesServerNameGets the host name of the connected session, or null if not connected.
      Public PropertiesServerPortGets the server port of the connected session, or 0 if not connected.
      Public PropertiesServerTimeZoneOffsetThis value is used to synchronize the CreationTime and LastWriteTime of files after a transfer. The default value is TimeSpan.Zero. (Inherited from FileSystem)
      Public PropertiesStateGets the current state of the Scp object.
      Public PropertiesThreadIdGets the thread id. (Inherited from FileSystem)
      Public PropertiesTimeoutGets or sets a value, in milliseconds, indicating after what period an SCP operation (sending commands, waiting for responses or time between data buffer transfers) should timeout. Specify -1 or 0 to indicate that the request does not time out.
      Public PropertiesTraceListenerManagerGets or sets the TraceListenerManager object to which the log messages generated by this object are sent. If not set, the Default trace listener manager is used. If this property is set to null, all messages from this object wont be logged.
      Public PropertiesTraceSourceOverridden. Gets or sets the source object for all log messages generated by this object. If not set, the property returns the current object.
      Public PropertiesUniqueIdGets the unique object id. (Inherited from FileSystem)
      Public PropertiesUserNameGets the user of the connected session, or null if not connected.
      Top

      Protected Properties

      NameDescription
      Protected PropertiesCanGetStreamForReadingOverridden. Returns a field indicating whether the system support getting stream for reading data from file. For internal uses only.
      Protected PropertiesCanGetStreamForWritingOverridden. Returns a field indicating whether the system support getting stream for writting data to file. For internal uses only.
      Top

      Public Fields

      NameDescription
      Public FieldsStatic MemberDefaultPortDefault SCP port (22).
      Top

      Public Methods

      NameDescription
      Public MethodsAuthenticateOverloaded. Authenticates the user to the SFTP server.
      Public MethodsAuthenticateAsyncOverloaded. Asynchronously authenticates to the server using GSSAPI.
      Public MethodsStatic MemberCalculateTimeDiffCalculates the time difference between the source and the dest file systems. (Inherited from FileSystem)
      Public MethodsCancelOverloaded. Overridden. Cancels the file transfer operation associated with the specified user-defined object.
      Public MethodsChangePasswordChanges the specified user's password on the SFTP server and authenticates.
      Public MethodsChangePasswordAsyncOverloaded. Asynchronous changes the specified user's password on the SFTP server and authenticates.
      Public MethodsCombinePathCombines two path strings. (Inherited from FileSystem)
      Public MethodsConnectOverloaded. Connects to the SFTP server.
      Public MethodsConnectAsyncOverloaded. Initiates an asynchronous operation to an FTP server.
      Public MethodsCopyFromCopies data in a stream to the specified destination file on this system. (Inherited from FileSystem)
      Public MethodsCopyFromAsyncAsynchronously copies data in a stream to the specified destination file on this system. (Inherited from FileSystem)
      Public MethodsStatic MemberCopyToCopies a file from this file system to another file system. (Inherited from FileSystem)
      Public MethodsStatic MemberCopyToAsyncAsynchronously copies a file from this file system to another file system. (Inherited from FileSystem)
      Public MethodsCreateDirectoryCreates an empty directory. (Inherited from FileSystem)
      Public MethodsCreateDirectoryAsyncBegins an asynchronous CreateDirectory operation. Creates an empty directory. (Inherited from FileSystem)
      Public MethodsCreateFileInfoOverloaded. Overridden. Creates a new ScpFileInfo.
      Public MethodsDeleteDeletes files or directories and, if indicated, any subdirectories matching the specified search condition on the filesToDelete list. (Inherited from FileSystem)
      Public MethodsDeleteAsyncAsynchronously deletes files or directories and, if indicated, any subdirectories matching the specified search condition on the filesToDelete list. This method only deletes the items in the specified directory if the baseDirectoryPath parameter does not end with a directory separator (e.g. '/' or '\'). To remove the whole directory, you should add a directory separator character at the end of that parameter. (Inherited from FileSystem)
      Public MethodsDirectoryExistsAsyncAsynchronously detects whether the specified directory exists on the file system. (Inherited from FileSystem)
      Public MethodsDisconnectDisconnects from the SSH server.
      Public MethodsDisconnectAsyncOverloaded. Begins an asynchronous operation to inform the server that the connection is about to close and terminates the connection.
      Public MethodsDisposeReleases all used resources. (Inherited from FileSystem)
      Public MethodsDownloadDownloads files, directories, and subdirectories in the specified path to the specified local directory. If the local directory does not exist, it will be created.
      Public MethodsDownloadAsyncOverloaded. Asynchronously downloads files, directories, and subdirectories in the specified path to the specified local directory. If the local directory does not exist, it will be created.
      Public MethodsDownloadFileOverloaded. Download a file from an the server, overriding it if it already exists.
      Public MethodsDownloadFileAsyncOverloaded. Downloads the remote file to the data stream.
      Public MethodsEnsuresDirectoryCreatedEnsures the specified directory exists on the file system. If the specified directory does not exist, a new one is to be created. (Inherited from FileSystem)
      Public MethodsStatic MemberGetCommonChecksumAlgorithmsGets checksum algorithms that both file system have in common. (Inherited from FileSystem)
      Public MethodsGetCurrentDirectoryOverridden. Gets the current directory.
      Public MethodsGetCurrentDirectoryAsyncAsynchronously gets the current working directory of the file system. (Inherited from FileSystem)
      Public MethodsGetDirectoryNameReturns the directory information for the specified path string. (Inherited from FileSystem)
      Public MethodsGetFileNameReturns the file name and extension of the specified path string. (Inherited from FileSystem)
      Public MethodsGetFullPathReturns a full path of the specified path. (Inherited from FileSystem)
      Public MethodsGetSupportedChecksumTypesOverridden. Returns the supported checksum types.
      Public MethodsIsCancelingReturns a boolean value indicating whether user has called the Cancel method. (Inherited from FileSystem)
      Public MethodsIsFatalErrorReturns a boolean value indicating whether the specified error indicates that the client should reconnect to the server.
      Public MethodsIsPathRootedGets a value indicating whether the specified path string contains absolute or relative path information. (Inherited from FileSystem)
      Public MethodsKeepAliveSends a data packet to the server to keep the connection alive.
      Public MethodsKeepAliveAsyncOverloaded. Begins an asynchronous operation to send a command or data packet to the server to keep the connection alive.
      Public MethodsMoveMoves files that match the search condition specified in the options parameter from the specified directory to the destination directory using multiple threads. This method only moves the items of the specified directory if the sourcePath parameter does not end with a directory separator (e.g. '/' or '\'). To move the whole directory, use the Rename method instead. (Inherited from FileSystem)
      Public MethodsMoveAsyncAsynchronously moves files that match the search condition specified in the options parameter from the specified directory to the destination directory on this file system. This method only moves the items of the specified directory if the sourcePath parameter does not end with a directory separator (e.g. '/' or '\'). To move the whole directory, use the Rename method instead. (Inherited from FileSystem)
      Public MethodsNormalizePathNormalizes a path. This method normalizes path like "\my folder\\my sub folder/sub folder/\my file" to "/my folder/my sub folder/sub folder/my file" if directory separator character is '/'. (Inherited from FileSystem)
      Public MethodsQuickSynchronizeSynchronizes the specified local directory with the specified source directory with the specified options. (Inherited from FileSystem)
      Public MethodsQuickSynchronizeAsyncInitiates an asynchronous operation to synchronize contents of a source directory and a local directory. (Inherited from FileSystem)
      Public MethodsReuseConnectionOverloaded. Binds the Scp object to an underlying SSH session. This makes it possible to run multiple SCP sessions over a single SSH session. This can be used instead of Connect/Authenticate methods.
      Public MethodsReuseConnectionAsyncOverloaded. Asynchronously binds the Sftp object to an underlying SSH session. This makes it possible to run multiple SFTP sessions over a single SSH session. This can be used instead of Connect/Authenticate methods.
      Public MethodsSetCurrentDirectoryAsyncBegins an asynchronous SetCurrentDirectory operation. (Inherited from FileSystem)
      Public MethodsSetSocketFactorySets the socket factory to be used to create communication sockets.
      Public MethodsToStringOverridden. Returns a string representation of this object.
      Public MethodsStatic MemberTransferFilesTransfers files from the specified source file system to the specified destination file system. (Inherited from FileSystem)
      Public MethodsStatic MemberTransferFilesAsyncAsynchronously transfers files from the specified source file system to the specified destination file system. (Inherited from FileSystem)
      Public MethodsUploadOverloaded. Uploads files from the specified source directory on the specified source file system to the specified remote directory using multiple threads.
      Public MethodsUploadAsyncOverloaded. Asynchronously uploads files from the specified local directory to the remote directory. This method only uploads the items in the specified directory if the localPath parameter does not end with a directory separator (e.g. '\' or '/'). To also create the directory in the destination, add a directory separator character at the end of that parameter.
      Public MethodsUploadFileOverloaded. Uploads from the current position in the specified source stream and writes to the destination file on the server.
      Public MethodsUploadFileAsyncOverloaded. Begins an asynchronous operation to upload the content of the data stream to the file on the server.
      Top

      Protected Methods

      NameDescription
      Protected MethodsDeleteFileSyncOverridden. Deletes the specified file.
      Protected MethodsDisposeOverridden. Releases the unmanaged resources used by the Sftp and optionally releases the managed resources.
      Protected MethodsFinalizeOverridden. Finalizer. Called by garbage collector during object destruction.
      Protected MethodsGetItemInfoPartsBeforeTransferringIndicates whether the file system should obtains information of the source files before transferring. (Inherited from FileSystem)
      Virtual Protected MethodsOnAuthenticateCompletedRaises the AuthenticateCompleted event.
      Virtual Protected MethodsOnBannerRaises the Banner event.
      Virtual Protected MethodsOnChangePasswordCompletedRaises the ChangePasswordCompleted event.
      Virtual Protected MethodsOnCommandResponseRaises the CommandResponse event.
      Virtual Protected MethodsOnConnectCompletedRaises the ConnectCompleted event.
      Protected MethodsOnCopyFromCompletedRaises the CopyFromCompleted event. (Inherited from FileSystem)
      Protected MethodsOnCopyToCompletedRaises the CopyToCompleted event. (Inherited from FileSystem)
      Protected MethodsOnCreateDirectoryCompletedRaises the CreateDirectoryCompleted event. (Inherited from FileSystem)
      Protected MethodsOnDeleteCompletedRaises the DeleteCompleted event. (Inherited from FileSystem)
      Protected MethodsOnDeleteDirectoryCompletedRaises the DeleteDirectoryCompleted event. (Inherited from FileSystem)
      Protected MethodsOnDeleteFileCompletedRaises the DeleteFileCompleted event. (Inherited from FileSystem)
      Protected MethodsOnDirectoryExistsCompletedRaises the DirectoryExistsCompleted event. (Inherited from FileSystem)
      Virtual Protected MethodsOnDisconnectCompletedRaises the DisconnectCompleted event.
      Virtual Protected MethodsOnDownloadCompletedRaises the DownloadCompleted event.
      Virtual Protected MethodsOnDownloadFileCompletedRaises the DownloadFileCompleted event.
      Protected MethodsOnFileExistsCompletedRaises the FileExistsCompleted event. (Inherited from FileSystem)
      Protected MethodsOnGetCurrentDirectoryCompletedRaises the GetCurrentDirectoryCompleted event. (Inherited from FileSystem)
      Protected MethodsOnGetDirectorySizeCompletedRaises the GetDirectorySizeCompleted event. (Inherited from FileSystem)
      Protected MethodsOnGetFileChecksumCompletedRaises the GetFileChecksumCompleted event. (Inherited from FileSystem)
      Protected MethodsOnGetFileLengthCompletedRaises the GetFileLengthCompleted event. (Inherited from FileSystem)
      Protected MethodsOnGetItemInfoCompletedRaises the GetItemInfoCompleted event. (Inherited from FileSystem)
      Protected MethodsOnGetLastWriteTimeCompletedRaises the GetLastWriteTimeCompleted event. (Inherited from FileSystem)
      Virtual Protected MethodsOnHostKeyVerifyingRaises the HostKeyVerifying event.
      Virtual Protected MethodsOnKeepAliveCompletedRaises the KeepAliveCompleted event.
      Virtual Protected MethodsOnKeyboardInteractiveAuthenticationRaises the KeyboardInteractiveAuthentication event.
      Protected MethodsOnListDirectoryCompletedRaises the ListDirectoryCompleted event. (Inherited from FileSystem)
      Protected MethodsOnListNameCompletedRaises the ListNameCompleted event. (Inherited from FileSystem)
      Protected MethodsOnMoveFilesCompletedRaises the MoveCompleted event. (Inherited from FileSystem)
      Virtual Protected MethodsOnPasswordChangeRequestRaises the PasswordChangeRequest event.
      Protected MethodsOnProgressRaises the Progress event. (Inherited from FileSystem)
      Protected MethodsOnQuickSynchronizeCompletedRaises the QuickSynchronizeCompleted event. (Inherited from FileSystem)
      Virtual Protected MethodsOnReconnectedRaises the Reconnected event.
      Virtual Protected MethodsOnReconnectingRaises the Reconnecting event.
      Virtual Protected MethodsOnReconnectionErrorCheckingRaises the ReconnectionErrorChecking event.
      Protected MethodsOnRenameCompletedRaises the RenameCompleted event. (Inherited from FileSystem)
      Virtual Protected MethodsOnReuseConnectionCompletedRaises the ReuseConnectionCompleted event.
      Protected MethodsOnSearchCompletedRaises the SearchCompleted event. (Inherited from FileSystem)
      Protected MethodsOnSetCurrentDirectoryCompletedRaises the SetCurrentDirectoryCompleted event. (Inherited from FileSystem)
      Protected MethodsOnSetLastWriteTimeCompletedRaises the SetLastWriteTimeCompleted event. (Inherited from FileSystem)
      Virtual Protected MethodsOnStateChangedRaises the StateChanged event.
      Protected MethodsOnThreadStateChangedRaises the ThreadStateChanged event. (Inherited from FileSystem)
      Protected MethodsOnTransferConfirmOverridden. Raises the TransferConfirm event.
      Virtual Protected MethodsOnUploadCompletedRaises the UploadCompleted event.
      Virtual Protected MethodsOnUploadFileCompletedRaises the UploadFileCompleted event.
      Top

      Public Events

      NameDescription
      Public EventsAuthenticateCompletedOccurs when an asynchronous AuthenticateAsync operation completes.
      Public EventsBannerOccurs when a banner message is received from the server.
      Public EventsChangePasswordCompletedOccurs when an asynchronous ChangePasswordAsync operation completes.
      Public EventsCommandResponseOccurs when a command has been sent to or a response has been received from the server.
      Public EventsConnectCompletedOccurs when an asynchronous ConnectAsync operation completes.
      Public EventsCopyFromCompletedOccurs when an asynchronous CopyFromAsync operation completes. (Inherited from FileSystem)
      Public EventsCopyToCompletedOccurs when an asynchronous CopyToAsync operation completes. (Inherited from FileSystem)
      Public EventsCreateDirectoryCompletedOccurs when an asynchronous CreateDirectoryAsync operation completes. (Inherited from FileSystem)
      Public EventsDeleteCompletedOccurs when an asynchronous DeleteAsync operation completes. (Inherited from FileSystem)
      Public EventsDirectoryExistsCompletedOccurs when an asynchronous DirectoryExistsAsync operation completes. (Inherited from FileSystem)
      Public EventsDisconnectCompletedOccurs when an asynchronous DisconnectAsync operation completes.
      Public EventsDownloadCompletedOccurs when an asynchronous DownloadAsync operation completes.
      Public EventsDownloadFileCompletedOccurs when an asynchronous DownloadFileAsync operation completes.
      Public EventsFileExistsCompletedOccurs when an asynchronous FileExistsAsync operation completes. (Inherited from FileSystem)
      Public EventsGetCurrentDirectoryCompletedOccurs when an asynchronous GetCurrentDirectoryAsync operation completes. (Inherited from FileSystem)
      Public EventsGetDirectorySizeCompletedOccurs when an asynchronous GetDirectorySizeAsync operation completes. (Inherited from FileSystem)
      Public EventsGetFileLengthCompletedOccurs when an asynchronous GetFileLengthAsync operation completes. (Inherited from FileSystem)
      Public EventsHostKeyVerifyingOccurs when a fingerprint is received from the server and needs to be validated.
      Public EventsKeepAliveCompletedOccurs when an asynchronous KeepAliveAsync operation completes.
      Public EventsKeyboardInteractiveAuthenticationOccurs when an authentication request is received from the server that cannot be answered programatically.
      Public EventsMoveCompletedOccurs after a MoveAsync call has been completed. (Inherited from FileSystem)
      Public EventsPasswordChangeRequestOccurs when user's password need to be changed.
      Public EventsProgressOccurs when a block of data is transferred, or a file operation is being or has been executed. (Inherited from FileSystem)
      Public EventsQuickSynchronizeCompletedOccurs when an asynchronous QuickSynchronizeAsync operation completes. (Inherited from FileSystem)
      Public EventsReconnectedOccurs when the file system encountered an error and reconnected to the server successfully.
      Public EventsReconnectingOccurs when the file system has encountered an error and trying to reconnect to the server.
      Public EventsReconnectionErrorCheckingOccurs when the file system has encountered an error and needs to determine whether it should reconnect to the server.
      Public EventsReuseConnectionCompletedOccurs when an asynchronous ReuseConnectionAsync operation completes.
      Public EventsSearchCompletedOccurs when an asynchronous search operation completes. (Inherited from FileSystem)
      Public EventsSetCurrentDirectoryCompletedOccurs when an asynchronous SetCurrentDirectoryAsync operation completes. (Inherited from FileSystem)
      Public EventsStateChangedOccurs when the state of the Sftp object is changed.
      Public EventsThreadStateChangedOccurs when the state of the thread is changed while in a multi-thread file transfer. (Inherited from FileSystem)
      Public EventsTransferConfirmOccurs when the file system has detected an issue while transferring files such as existing file found, symlink detected or an error encountered. (Inherited from FileSystem)
      Public EventsUploadCompletedOccurs when an asynchronous UploadAsync operation completes.
      Public EventsUploadFileCompletedOccurs when an asynchronous UploadFileAsync operation completes.
      Top

      See Also