Package com.sshtools.common.files.vfs
Class VFSFile
java.lang.Object
com.sshtools.common.files.AbstractFileImpl<VFSFile>
com.sshtools.common.files.vfs.VFSFile
- All Implemented Interfaces:
com.sshtools.common.files.AbstractFile
-
Field Summary
Fields inherited from class com.sshtools.common.files.AbstractFileImpl
fileFactory
-
Constructor Summary
ConstructorsConstructorDescriptionVFSFile
(String path, VFSFileFactory fileFactory) VFSFile
(String path, String defaultPath, VFSFileFactory fileFactory, org.apache.commons.vfs2.FileSystemOptions opts) VFSFile
(org.apache.commons.vfs2.FileObject file, VFSFileFactory fileFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyFrom
(com.sshtools.common.files.AbstractFile src) boolean
boolean
boolean
delete
(boolean recurse) protected boolean
protected int
boolean
exists()
com.sshtools.common.sftp.SftpFileAttributes
List<com.sshtools.common.files.AbstractFile>
org.apache.commons.vfs2.FileObject
getName()
com.sshtools.common.files.AbstractFile
boolean
boolean
isFile()
boolean
isHidden()
boolean
boolean
long
long
length()
void
moveTo
(com.sshtools.common.files.AbstractFile target) com.sshtools.common.files.AbstractFileRandomAccess
openFile
(boolean writeAccess) void
refresh()
com.sshtools.common.files.AbstractFile
resolveFile
(String child) void
setAttributes
(com.sshtools.common.sftp.SftpFileAttributes attrs) boolean
void
truncate()
Methods inherited from class com.sshtools.common.files.AbstractFileImpl
equals, getFileFactory, getOutputStream, hashCode, symlinkTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sshtools.common.files.AbstractFile
existsNoFollowLinks, getAttributesNoFollowLinks, getVolume, linkFrom, linkTo, open, startMultipartUpload, supportsMultipartTransfers, symlinkFrom
-
Constructor Details
-
VFSFile
-
VFSFile
- Throws:
IOException
-
VFSFile
public VFSFile(String path, String defaultPath, VFSFileFactory fileFactory, org.apache.commons.vfs2.FileSystemOptions opts) throws IOException - Throws:
IOException
-
-
Method Details
-
getFileObject
public org.apache.commons.vfs2.FileObject getFileObject() -
getParentFile
- Throws:
IOException
-
exists
- Throws:
IOException
-
createFolder
public boolean createFolder() throws com.sshtools.common.permissions.PermissionDeniedException, IOException- Throws:
com.sshtools.common.permissions.PermissionDeniedException
IOException
-
lastModified
- Throws:
IOException
-
getName
-
length
- Throws:
IOException
-
getAttributes
- Throws:
IOException
-
isHidden
- Throws:
IOException
-
isDirectory
- Throws:
IOException
-
getChildren
public List<com.sshtools.common.files.AbstractFile> getChildren() throws IOException, com.sshtools.common.permissions.PermissionDeniedException- Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-
isFile
- Throws:
IOException
-
getAbsolutePath
public String getAbsolutePath() throws IOException, com.sshtools.common.permissions.PermissionDeniedException- Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-
copyFrom
public void copyFrom(com.sshtools.common.files.AbstractFile src) throws IOException, com.sshtools.common.permissions.PermissionDeniedException - Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-
isReadable
- Throws:
IOException
-
isWritable
- Throws:
IOException
-
createNewFile
public boolean createNewFile() throws com.sshtools.common.permissions.PermissionDeniedException, IOException- Throws:
com.sshtools.common.permissions.PermissionDeniedException
IOException
-
truncate
public void truncate() throws com.sshtools.common.permissions.PermissionDeniedException, IOException- Throws:
com.sshtools.common.permissions.PermissionDeniedException
IOException
-
getInputStream
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
delete
- Throws:
IOException
-
moveTo
public void moveTo(com.sshtools.common.files.AbstractFile target) throws IOException, com.sshtools.common.permissions.PermissionDeniedException - Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-
setAttributes
- Throws:
IOException
-
getCanonicalPath
public String getCanonicalPath() throws IOException, com.sshtools.common.permissions.PermissionDeniedException- Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-
supportsRandomAccess
public boolean supportsRandomAccess() -
openFile
public com.sshtools.common.files.AbstractFileRandomAccess openFile(boolean writeAccess) throws IOException - Throws:
IOException
-
refresh
public void refresh() -
resolveFile
public com.sshtools.common.files.AbstractFile resolveFile(String child) throws IOException, com.sshtools.common.permissions.PermissionDeniedException - Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-
doHashCode
protected int doHashCode()- Specified by:
doHashCode
in classcom.sshtools.common.files.AbstractFileImpl<VFSFile>
-
doEquals
- Specified by:
doEquals
in classcom.sshtools.common.files.AbstractFileImpl<VFSFile>
-
readSymbolicLink
public String readSymbolicLink() throws IOException, com.sshtools.common.permissions.PermissionDeniedException- Throws:
IOException
com.sshtools.common.permissions.PermissionDeniedException
-