FTP 서버에 연결하기 위한 간단하고 견고한 Dart 라이브러리로, 여러 플랫폼 간 원활한 파일 전송을 가능하게 합니다. 원격 FTP 서버와 상호작용할 수 있는 직관적인 API를 제공하며, 업로드, 다운로드, 파일 목록 조회 및 디렉터리 관리와 같은 일반적인 작업을 지원합니다. 신뢰성과 사용 편의성을 고려하여 설계되었으며, Android, iOS, macOS, Windows, Linux 대상의 Flutter 애플리케이션에 원활하게 통합됩니다. FTP를 통해 보안 또는 자동화된 파일 처리가 필요한 앱에 적합합니다.
사용 사례
앱과 FTP 서버 간의 파일 전송
자동 백업 시스템
앱에서의 원격 파일 관리
FTP 스토리지와 앱 데이터 동기화
FTP에서 구성 파일 다운로드 중
주요 기능
크로스 플랫폼 지원
간단하고 직관적인 API
강력한 오류 처리
파일 업로드/다운로드를 지원합니다
디렉터리 목록 및 탐색
적합한 대상
파일 동기화 앱을 개발하는 개발자
원격 파일 액세스가 필요한 앱
FTP를 사용하는 백엔드 서비스
FTP를 통해 파일을 관리하는 IoT 장치
네트워크 프로토콜에 대한 교육 프로젝트
고려 사항
안정적인 인터넷 연결이 필요합니다
내장 암호화 없음 (필요 시 FTPS 사용)
FTP 프로토콜만 사용 가능
방화벽 구성이 필요할 수 있습니다
추가 조치 없이 고보안 환경에는 적합하지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Flutter FTP Connect
Flutter simple and robust dart FTP Connect Library to interact with FTP and SFTP Servers.
//Get directory content
ftpConnect.listDirectoryContent();
//Create directory
ftpConnect.makeDirectory('newDir');
//Change directory
ftpConnect.changeDirectory('moveHereDir');
//get current directory
ftpConnect.currentDirectory();
//Delete directory
ftpConnect.deleteDirectory('dirToDelete');
//Delete a non-empty directory (recursively)
ftpConnect.deleteNonEmptyDirectory('dirToDelete');
//check for directory existance
ftpConnect.checkFolderExistence('dirToCheck');
//create a directory if it does not exist
ftpConnect.createFolderIfNotExist('dirToCreate');
//Upload a local directory recursively to the server
ftpConnect.uploadDirectory(Directory('localDir'), 'remoteDir');
//Download a remote directory recursively
ftpConnect.downloadDirectory('remoteDir', Directory('localDir'));
File functions:
//rename file
ftpConnect.rename('test1.txt', 'test2.txt');
//file size
ftpConnect.sizeFile('test1.txt');
//file existence
ftpConnect.existFile('test1.txt');
//delete file
ftpConnect.deleteFile('test2.zip');
//upload in-memory bytes (no local file needed)
ftpConnect.uploadData(Uint8List.fromList([1, 2, 3]), 'remote.bin');
//download a remote file into memory as bytesfinalUint8List bytes = await ftpConnect.downloadToBytes('remote.bin');
Parameters
Common parameters (FTPConnect and SFTPConnect)
Property
Description
host
Hostname or IP Address
port
Port number (FTP defaults to 21, FTPS to 990, SFTP to 22)
user
Username (Defaults to anonymous)
pass
Password if not anonymous login
showLog
Enable Debug Logging (Defaults to false)
logger
Custom logger
timeout
Timeout in seconds to wait for responses (Defaults to 30)
FTP-only parameters (FTPConnect)
Property
Description
securityType
SecurityType.ftp / ftpes / ftps (Defaults to ftp)
SFTP-only parameters (SFTPConnect)
Property
Description
privateKey
PEM/OpenSSH private key content, used instead of pass
SFTP is provided by the SFTPConnect class, powered by the pure-Dart
dartssh2 package. Both FTPConnect and
SFTPConnect implement the same FileTransferClient interface, so they share
identical method names/signatures and you can swap one for the other by changing
only the instantiated class.
ℹ️ dartssh2 is written in pure Dart, so SFTPConnect works on every
platform supported by Dart/Flutter (except web, which has no raw TCP sockets).
If this plugin was useful to you, helped you to deliver your app, saved you a lot of time, or you just want to support the project, I would be very grateful if you buy me a cup of coffee.