Class JschSession.JschFtpChannel
java.lang.Object
org.eclipse.jgit.transport.ssh.jsch.JschSession.JschFtpChannel
- All Implemented Interfaces:
FtpChannel
- Enclosing class:
- JschSession
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jgit.transport.FtpChannel
FtpChannel.DirEntry, FtpChannel.FtpException -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChanges the current remote directory.voidConnects theFtpChannelto the remote end.voidDisconnects andFtpChannel.Obtain anInputStreamto read the contents of a remote file.private booleanDetermine whether the server has the posix-rename extension.booleanLists contents of a remote directoryprivate <T> TvoidCreates a directory on the remote file system.Obtain anOutputStreamto write to a remote file.pwd()voidRenames a file on the remote file system.voidDeletes a file on the remote file system.voidDeletes a directory on the remote file system.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jgit.transport.FtpChannel
delete
-
Field Details
-
ftp
private com.jcraft.jsch.ChannelSftp ftp
-
-
Constructor Details
-
JschFtpChannel
private JschFtpChannel()
-
-
Method Details
-
connect
Description copied from interface:FtpChannelConnects theFtpChannelto the remote end.- Specified by:
connectin interfaceFtpChannel- Parameters:
timeout- for establishing the FTP connectionunit- of thetimeout- Throws:
IOException
-
disconnect
public void disconnect()Description copied from interface:FtpChannelDisconnects andFtpChannel.- Specified by:
disconnectin interfaceFtpChannel
-
map
- Throws:
IOException
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceFtpChannel- Returns:
- whether the
FtpChannelis connected
-
cd
Description copied from interface:FtpChannelChanges the current remote directory.- Specified by:
cdin interfaceFtpChannel- Parameters:
path- target directory- Throws:
IOException- if the operation could not be performed remotely
-
pwd
- Specified by:
pwdin interfaceFtpChannel- Returns:
- the current remote directory path
- Throws:
IOException
-
ls
Description copied from interface:FtpChannelLists contents of a remote directory- Specified by:
lsin interfaceFtpChannel- Parameters:
path- of the directory to list- Returns:
- the directory entries
- Throws:
IOException
-
rmdir
Description copied from interface:FtpChannelDeletes a directory on the remote file system. The directory must be empty.- Specified by:
rmdirin interfaceFtpChannel- Parameters:
path- to delete- Throws:
IOException
-
mkdir
Description copied from interface:FtpChannelCreates a directory on the remote file system.- Specified by:
mkdirin interfaceFtpChannel- Parameters:
path- to create- Throws:
IOException
-
get
Description copied from interface:FtpChannelObtain anInputStreamto read the contents of a remote file.- Specified by:
getin interfaceFtpChannel- Parameters:
path- of the file to read- Returns:
- the stream to read from
- Throws:
IOException
-
put
Description copied from interface:FtpChannelObtain anOutputStreamto write to a remote file. If the file exists already, it will be overwritten.- Specified by:
putin interfaceFtpChannel- Parameters:
path- of the file to read- Returns:
- the stream to read from
- Throws:
IOException
-
rm
Description copied from interface:FtpChannelDeletes a file on the remote file system.- Specified by:
rmin interfaceFtpChannel- Parameters:
path- to delete- Throws:
IOException- if the file does not exist or could otherwise not be deleted
-
rename
Description copied from interface:FtpChannelRenames a file on the remote file system. Iftoexists, it is replaced byfrom. (POSIX rename() semantics)- Specified by:
renamein interfaceFtpChannel- Parameters:
from- original name of the fileto- new name of the file- Throws:
IOException- See Also:
-
hasPosixRename
private boolean hasPosixRename()Determine whether the server has the posix-rename extension.- Returns:
trueif it is supported,falseotherwise- See Also:
-