FTP
The FTP module allows you perform various operations against an FTP or SFTP server.
✨ Features
📦 Installation
Requirements
Install via CommandBox CLI
Install via BoxLang Binary
From Source
🚀 Quick Start
💡 Usage Examples
Basic Examples
📁 Connect and List Files
📤 Upload a File
📥 Download a File
Advanced Examples
🔐 Secure Connection with Passive Mode
🌐 Connect Through Proxy Server
📂 Directory Management
📊 List Directory as Array
🔄 Bulk File Transfer
🏷️ Rename Files and Directories
📚 Available Actions
🔌 Connection Actions
open - Connect to FTP Server
open - Connect to FTP ServerAttribute
Type
Required
Default
Description
close - Close FTP Connection
close - Close FTP ConnectionAttribute
Type
Required
Description
📂 Directory Actions
changedir - Change Working Directory
changedir - Change Working DirectoryAttribute
Type
Required
Description
createdir - Create Directory
createdir - Create DirectoryAttribute
Type
Required
Description
existsdir - Check Directory Existence
existsdir - Check Directory ExistenceAttribute
Type
Required
Description
getcurrentdir - Get Working Directory
getcurrentdir - Get Working DirectoryAttribute
Type
Required
Description
listdir - List Directory Contents
listdir - List Directory ContentsAttribute
Type
Required
Default
Description
removedir - Remove Directory
removedir - Remove DirectoryAttribute
Type
Required
Description
renamedir - Rename Directory
renamedir - Rename DirectoryAttribute
Type
Required
Description
📄 File Actions
existsfile - Check File Existence
existsfile - Check File ExistenceAttribute
Type
Required
Description
getfile - Download File
getfile - Download FileAttribute
Type
Required
Default
Description
putfile - Upload File
putfile - Upload FileAttribute
Type
Required
Description
removefile (or remove) - Delete File
removefile (or remove) - Delete FileAttribute
Type
Required
Description
renamefile - Rename File
renamefile - Rename FileAttribute
Type
Required
Description
📊 Result Object
Common Status Codes
Code
Meaning
Description
Using Result Variables
🎯 Interception Points
beforeFTPCall
beforeFTPCallafterFTPCall
afterFTPCallonFTPConnectionOpen
onFTPConnectionOpenonFTPConnectionClose
onFTPConnectionCloseonFTPError
onFTPError🔗 Connection Management
Connection Lifecycle
Reusing Connections
Connection Best Practices
Accessing Connection Information
❌ Error Handling
Common Connection Issues
Error Handling Patterns
Try/Catch/Finally
Status Code Checking
❓ Troubleshooting
Connection Refused Errors
Passive Mode Failures
File Upload Failures
Connection Timeout
Proxy Connection Issues
🛠️ Development & Testing
Local Development Setup
Test Server Configuration
Building from Source
Module Architecture
Testing with Docker
🔄 CFML Compatibility
Differences from CFML
Migration from CFML
🤝 Contributing
🐛 Found a Bug?
💡 Have an Enhancement Idea?
📚 Improve Documentation
💰 Financial Support
📞 Support Channels
🏆 Contributors
🔐 Security Vulnerabilities
📄 License
💼 Support & Resources
📖 Documentation
🌐 Links
🎓 Learning Resources
THE DAILY BREAD
Last updated
Was this helpful?
