Package com.sshtools.common.files
Interface AbstractFile
- All Known Implementing Classes:
AbstractDirectFile,AbstractFileAdapter,AbstractFileImpl,DirectFile,DirectFileJava7,NioFile,ReadOnlyFileFactory.ReadOnlyAbstractFile
public interface AbstractFile
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidcopyFrom(AbstractFile src) booleanbooleanbooleandelete(boolean recursive) booleanexists()default booleandefault SftpFileAttributesAbstractFileFactory<? extends AbstractFile>getName()getOutputStream(boolean append) default FileVolumebooleanbooleanisFile()booleanisHidden()booleanbooleanlonglonglength()default voiddefault voidDeprecated, for removal: This API element is subject to removal in a future version.default voidmoveTo(AbstractFile target) default OpenFileopen(com.sshtools.common.util.UnsignedInteger32 flags, Optional<com.sshtools.common.util.UnsignedInteger32> accessFlags, byte[] handle) openFile(boolean writeAccess) default Stringvoidrefresh()resolveFile(String child) voidsetAttributes(SftpFileAttributes attrs) default MultipartTransferstartMultipartUpload(AbstractFile targetFile) default booleanbooleandefault voidsymlinkFrom(String target) default voidDeprecated, for removal: This API element is subject to removal in a future version.voidtruncate()
-
Method Details
-
getName
String getName() -
getInputStream
- Throws:
IOExceptionPermissionDeniedException
-
exists
- Throws:
IOExceptionPermissionDeniedException
-
existsNoFollowLinks
- Throws:
IOExceptionPermissionDeniedException
-
getChildren
- Throws:
IOExceptionPermissionDeniedException
-
getAbsolutePath
- Throws:
IOExceptionPermissionDeniedException
-
getParentFile
- Throws:
IOExceptionPermissionDeniedException
-
isDirectory
- Throws:
IOExceptionPermissionDeniedException
-
isFile
- Throws:
IOExceptionPermissionDeniedException
-
getOutputStream
- Throws:
IOExceptionPermissionDeniedException
-
isHidden
- Throws:
IOExceptionPermissionDeniedException
-
createFolder
- Throws:
PermissionDeniedExceptionIOException
-
isReadable
- Throws:
IOExceptionPermissionDeniedException
-
delete
- Throws:
IOExceptionPermissionDeniedException
-
getAttributes
SftpFileAttributes getAttributes() throws FileNotFoundException, IOException, PermissionDeniedException -
getAttributesNoFollowLinks
default SftpFileAttributes getAttributesNoFollowLinks() throws FileNotFoundException, IOException, PermissionDeniedException -
refresh
void refresh() -
lastModified
- Throws:
IOExceptionPermissionDeniedException
-
length
- Throws:
IOExceptionPermissionDeniedException
-
isWritable
- Throws:
IOExceptionPermissionDeniedException
-
createNewFile
- Throws:
PermissionDeniedExceptionIOException
-
truncate
- Throws:
PermissionDeniedExceptionIOException
-
setAttributes
- Throws:
IOException
-
getCanonicalPath
- Throws:
IOExceptionPermissionDeniedException
-
supportsRandomAccess
boolean supportsRandomAccess() -
open
default OpenFile open(com.sshtools.common.util.UnsignedInteger32 flags, Optional<com.sshtools.common.util.UnsignedInteger32> accessFlags, byte[] handle) throws IOException, PermissionDeniedException - Throws:
IOExceptionPermissionDeniedException
-
openFile
AbstractFileRandomAccess openFile(boolean writeAccess) throws IOException, PermissionDeniedException - Throws:
IOExceptionPermissionDeniedException
-
getOutputStream
- Throws:
IOExceptionPermissionDeniedException
-
resolveFile
- Throws:
IOExceptionPermissionDeniedException
-
getFileFactory
AbstractFileFactory<? extends AbstractFile> getFileFactory() -
symlinkTo
@Deprecated(since="3.1.0", forRemoval=true) default void symlinkTo(String target) throws IOException, PermissionDeniedException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOExceptionPermissionDeniedException
-
symlinkFrom
- Throws:
IOExceptionPermissionDeniedException
-
linkTo
@Deprecated(since="3.1.0", forRemoval=true) default void linkTo(String target) throws IOException, PermissionDeniedException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOExceptionPermissionDeniedException
-
linkFrom
- Throws:
IOExceptionPermissionDeniedException
-
readSymbolicLink
- Throws:
IOExceptionPermissionDeniedException
-
supportsMultipartTransfers
default boolean supportsMultipartTransfers() -
startMultipartUpload
default MultipartTransfer startMultipartUpload(AbstractFile targetFile) throws IOException, PermissionDeniedException - Throws:
IOExceptionPermissionDeniedException
-
copyFrom
- Throws:
IOExceptionPermissionDeniedException
-
moveTo
- Throws:
IOExceptionPermissionDeniedException
-
getVolume
- Throws:
IOException
-