Back to product page
- Introduction
- License agreement
- Getting Started
- Objects
- Enumerations
- wodFtpDLX
- Methods
- Abort
- About
- AppendData
- AppendFile
- AppendFileFrom
- CheckDir
- ClearCommandChannel
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- GetAttributes
- GetData
- GetDate
- GetFile
- GetFileAt
- GetFileAt64
- GetFiles
- GetSize
- ListDir
- ListNames
- LocalCRC
- LoopFiles
- MakeDir
- PutData
- PutFile
- PutFileAt
- PutFileAt64
- PutFiles
- RawReceived
- RawSend
- Refresh
- RemoteCRC
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Site
- Properties
- Account
- Arrange
- AscIITranslation
- Authentication
- BackColor
- Blocking
- BorderVisible
- BufferSize
- Certificate
- ClientName
- ColumnCount
- ColumnHeader
- Columns
- ColumnWidth
- Compression
- ContextMenu
- DirFormat
- DirItems
- Enabled
- Encryption
- EncryptionList
- ErrorText
- FIPS
- ForeColor
- HMacList
- Hostname
- IconView
- ItemSkip
- KeepAlive
- LastError
- ListItem
- ListParams
- LocalCertBag
- LocalPath
- Login
- MaxDataPort
- MaxTransferRate
- MinDataPort
- MyHostname
- MyIP
- Notification
- Passive
- Password
- PasvPort
- Port
- Protocol
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemotePath
- Resume
- SecureMethod
- ShellIcons
- SmartGet
- SmartPut
- SortItems
- SSLCipherList
- State
- StateText
- StrictHost
- TabStop
- Tag
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- UTF8Encoding
- Version
- Events
- ActionCopy
- ActionDelete
- ActionDownload
- ActionMakeDir
- ActionNewFile
- ActionPaste
- ActionProperties
- ActionRename
- ActionSelect
- AfterViewChange
- Attributes
- Attributes64
- Banner
- BeforeViewChange
- Click
- ClientCertRequired
- Connected
- CryptoInformation
- DblClick
- Disconnected
- Done
- FileTransferData
- Focus
- FTPReply
- HostCertificate
- HostFingerprint
- KeyPress
- ListItems
- LoginChallenge
- LoopError
- LoopItem
- MenuClick
- PreTranslateCommand
- PreTranslateReply
- Progress
- Progress64
- ShowContextMenu
- SiteReply
- StateChange
- Methods
- IwodFtpNotify
- DirItem
- DirItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
- How to...
FileTransferData method
Called during file transfer, allowing you to alter file contents.
Type
NoneSyntax
- Basic
object.FileTransferData Owner, FileData()
The FileTransferData(object,Owner,FileData) syntax has these parts:
The FileTransferData(object,Owner,FileData) syntax has these parts:
object | An expression evaluating to an object of type IwodFtpNotify. |
Owner | Required. A wodFtpDLXCom object. |
FileData | An array of Byte values. Actual data as byte array (SAFEARRAY(unsigned char *) for VC++ users). |
Remarks
This method is called only if you implemented IwodFtpNotify interface in your application, and wodFtpDLX.Notification property has received reference to instance of your implementation. FileTransferData notification method is called during file transfers when LocalPath property (and LocalPath argument in GetFile or PutFile methods) isn't set, or is set to "" (empty string). In such cases, GetFile and PutFile methods will not open local file for reading/writing, instead they will call this notification method allowing you to read/write data from remote file from/to byte array. Since FileData argument is a byte array, file contents can be changed in size and in values - you can supply new byte array to this argument if needed. For example, following code will always destroy all values in the array, and no matter how large files user tries to upload (or download), it will always end up with zero sized file:Private Sub IwodFtpNotify_FileTransferData(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, FileData() As Byte)
Dim b() As Byte
DirData = b
End Sub
For downloads: In order to determine exactly how many bytes are in FileData array, you should calculate it like this (VB example): UBound(FileData) - LBound(FileData) + 1 Remember that FileData(0) is the first element in the array. For uploads: to create new byte array and put some data inside, so it is transferred to remote side, you can use code similar to this (VB example):
Private Sub IwodFtpNotify_FileTransferData(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, FileData() As Byte)
Dim a As String
a = "some text"
ReDim FileData(Len(a) - 1)
Dim i As Integer
For i = 0 To Len(a) - 1
FileData(i) = Asc(Mid$(a, i + 1, 1))
Next i
Exit Sub