FTPConnect class
Methods
changeDirectory (String ? sDirectory )
→ Future <bool >
Change into the Directory with the Name of sDirectory
within the current directory.
checkFolderExistence (String pDirectory )
→ Future <bool >
check the existence of the Directory with the Name of pDirectory
.
connect ()
→ Future <bool >
Connect to the FTP Server
return true if we are connected successfully
createFolderIfNotExist (String pDirectory )
→ Future <bool >
Create a new Directory with the Name of pDirectory
in the current directory if it does not exist.
currentDirectory ()
→ Future <String >
Returns the current directory
deleteDirectory (String sDirectory )
→ Future <bool >
Deletes the Directory with the Name of sDirectory
in the current directory.
deleteEmptyDirectory (String ? sDirectory )
→ Future <bool >
Deletes the Directory with the Name of sDirectory
in the current directory.
deleteFile (String ? sFilename )
→ Future <bool >
Delete the file sFilename
from the server
disconnect ()
→ Future <bool >
Disconnect from the FTP Server
return true if we are disconnected successfully
downloadDirectory (String pRemoteDir , Directory pLocalDir , {int pRetryCount = 1 })
→ Future <bool >
Download the Remote Directory pRemoteDir
to the local File pLocalDir
pRetryCount
number of attempts
downloadFile (String ? sRemoteName , File fFile , {FileProgress? onProgress })
→ Future <bool >
Download the Remote File sRemoteName
to the local File fFile
downloadFileWithRetry (String pRemoteName , File pLocalFile , {int pRetryCount = 1 , FileProgress? onProgress })
→ Future <bool >
Download the Remote File pRemoteName
to the local File pLocalFile
pRetryCount
number of attempts
existFile (String sFilename )
→ Future <bool >
check the existence of the file sFilename
from the server
listDirectoryContent ()
→ Future <List <FTPEntry > >
Returns the content of the current directory
cmd
refer to the used command for the server, there is servers working
with MLSD and other with LIST
listDirectoryContentOnlyNames ()
→ Future <List <String > >
Returns the content names of the current directory
cmd
refer to the used command for the server, there is servers working
with MLSD and other with LIST for detailed content
makeDirectory (String sDirectory )
→ Future <bool >
Create a new Directory with the Name of sDirectory
in the current directory.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rename (String sOldName , String sNewName )
→ Future <bool >
Rename a file (or directory) from sOldName
to sNewName
sendCustomCommand (String pCmd )
→ Future <FTPReply >
setTransferType (TransferType pTransferType )
→ Future <void >
Set current transfer type of connection
sizeFile (String sFilename )
→ Future <int >
returns the file sFilename
size from server,
returns -1 if file does not exist
toString ()
→ String
A string representation of this object.
inherited
uploadFile (File fFile , {String sRemoteName = '' , FileProgress? onProgress })
→ Future <bool >
Upload the File fFile
to the current directory
uploadFileWithRetry (File fileToUpload , {String pRemoteName = '' , int pRetryCount = 1 , FileProgress? onProgress })
→ Future <bool >
Upload the File fileToUpload
to the current directory
if pRemoteName
is not setted the remote file will take take the same local name
pRetryCount
number of attempts