Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodFTPD
- Methods
- Properties
- Authentication
- BindIP
- BindIPType
- Certificate
- DirFormat
- Encryption
- EncryptionList
- FileLocking
- FIPS
- ForceUTF8
- GoodbyeMessage
- GreetingMessage
- HMacList
- HostKeyList
- KeyExchangeList
- MaxDataPort
- MinDataPort
- MonitorTransfers
- MyHostname
- MyIP
- Notification
- PasvPort
- Port
- Protocol
- Secure
- ServerName
- SFTPVersion
- Status
- StrictDataIP
- Threads
- Timeout
- UseIPv6
- Users
- Version
- VirtualFiles
- VirtualFolders
- Events
- wodFTPDNotify
- FtpUser
- FtpUsers
- VirtualFile
- VirtualFiles
- VirtualFolder
- VirtualFolders
- How to get support?
- Technical information
- Fast notifications interface
- Error list
AddFile method
Adds new virtual file.
Syntax
- Basic
object.AddFile RelativePath, Name, ResolvedPath
The AddFile(object,RelativePath,Name,ResolvedPath) syntax has these parts:
The AddFile(object,RelativePath,Name,ResolvedPath) syntax has these parts:
object | An expression evaluating to an object of type VirtualFiles. |
RelativePath | Required. A String value. Holds path where virtual file appears (may contain wildcards). |
Name | Required. A String value. Holds name of virtual file. |
ResolvedPath | Required. A String value. Holds full path where virtual file resolves. |
Remarks
AddFile method will add new virtual file to the collection - for the User or globally for the server. Adding new virtual files for the server - through wodFTPD.VirtualFiles property will affect only new users that connect - any users currently online will not see new file until they reconnect. To add new virtual file to existing (currently connected) users, use User.VirtualFiles collection.For example, to add virtual file for all new users that will be visible in their root path, you can do this:
FtpD.VirtualFiles.AddFile "/", "testfile.txt", "F:\latest_test_data.txt"
Users will see virtual files just as they really exist in your filesystem - they will not know the difference.