Package com.sshtools.common.files
Class AbstractFileAdapter
java.lang.Object
com.sshtools.common.files.AbstractFileAdapter
- All Implemented Interfaces:
AbstractFile
- Direct Known Subclasses:
ReadOnlyFileFactory.ReadOnlyAbstractFile
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(AbstractFile src) booleanbooleanbooleandelete(boolean recursive) booleanexists()abstract AbstractFileFactory<? extends AbstractFile>getName()getOutputStream(boolean append) protected voidinit(AbstractFile file) booleanbooleanisFile()booleanisHidden()booleanbooleanlonglonglength()voidvoidmoveTo(AbstractFile target) openFile(boolean writeAccess) voidrefresh()resolveFile(String child) voidsetAttributes(SftpFileAttributes attrs) startMultipartUpload(AbstractFile targetFile) booleanbooleanvoidsymlinkFrom(String target) voidtruncate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sshtools.common.files.AbstractFile
existsNoFollowLinks, getAttributesNoFollowLinks, getVolume, open, symlinkTo
-
Field Details
-
file
-
-
Constructor Details
-
AbstractFileAdapter
-
AbstractFileAdapter
public AbstractFileAdapter()
-
-
Method Details
-
getParentFile
- Specified by:
getParentFilein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
init
-
exists
- Specified by:
existsin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
createFolder
- Specified by:
createFolderin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
lastModified
- Specified by:
lastModifiedin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getName
- Specified by:
getNamein interfaceAbstractFile
-
length
- Specified by:
lengthin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getAttributes
- Specified by:
getAttributesin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isDirectory
- Specified by:
isDirectoryin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getChildren
- Specified by:
getChildrenin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isFile
- Specified by:
isFilein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getAbsolutePath
- Specified by:
getAbsolutePathin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isReadable
- Specified by:
isReadablein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
createNewFile
- Specified by:
createNewFilein interfaceAbstractFile- Throws:
PermissionDeniedExceptionIOException
-
truncate
- Specified by:
truncatein interfaceAbstractFile- Throws:
PermissionDeniedExceptionIOException
-
getInputStream
- Specified by:
getInputStreamin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
setAttributes
- Specified by:
setAttributesin interfaceAbstractFile- Throws:
IOException
-
getCanonicalPath
- Specified by:
getCanonicalPathin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
supportsRandomAccess
public boolean supportsRandomAccess()- Specified by:
supportsRandomAccessin interfaceAbstractFile
-
openFile
public AbstractFileRandomAccess openFile(boolean writeAccess) throws IOException, PermissionDeniedException - Specified by:
openFilein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isHidden
- Specified by:
isHiddenin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getOutputStream
- Specified by:
getOutputStreamin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isWritable
- Specified by:
isWritablein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
copyFrom
- Specified by:
copyFromin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
moveTo
- Specified by:
moveToin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
delete
- Specified by:
deletein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
refresh
public void refresh()- Specified by:
refreshin interfaceAbstractFile
-
getOutputStream
- Specified by:
getOutputStreamin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
resolveFile
- Specified by:
resolveFilein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getFileFactory
- Specified by:
getFileFactoryin interfaceAbstractFile
-
symlinkFrom
- Specified by:
symlinkFromin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
linkFrom
- Specified by:
linkFromin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
readSymbolicLink
- Specified by:
readSymbolicLinkin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
supportsMultipartTransfers
public boolean supportsMultipartTransfers()- Specified by:
supportsMultipartTransfersin interfaceAbstractFile
-
startMultipartUpload
public MultipartTransfer startMultipartUpload(AbstractFile targetFile) throws IOException, PermissionDeniedException - Specified by:
startMultipartUploadin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-