Package com.sshtools.common.files.direct
Class AbstractDirectFile<T extends AbstractDirectFile<T>>
java.lang.Object
com.sshtools.common.files.AbstractFileImpl<T>
com.sshtools.common.files.direct.AbstractDirectFile<T>
- All Implemented Interfaces:
AbstractFile
- Direct Known Subclasses:
DirectFile
public abstract class AbstractDirectFile<T extends AbstractDirectFile<T>>
extends AbstractFileImpl<T>
-
Field Summary
FieldsFields inherited from class com.sshtools.common.files.AbstractFileImpl
fileFactory -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDirectFile(String path, AbstractFileFactory<T> fileFactory, File homeDir) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleandelete(boolean recurse) protected booleanprotected intbooleanexists()abstract SftpFileAttributesgetName()booleanbooleanisFile()booleanisHidden()booleanbooleanlonglonglength()voidmoveTo(AbstractFile f2) openFile(boolean writeAccess) voidrefresh()voidsetAttributes(SftpFileAttributes attrs) booleanvoidtruncate()Methods inherited from class com.sshtools.common.files.AbstractFileImpl
equals, getFileFactory, getOutputStream, hashCode, symlinkToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sshtools.common.files.AbstractFile
copyFrom, existsNoFollowLinks, getAttributesNoFollowLinks, getChildren, getParentFile, getVolume, linkFrom, linkTo, open, readSymbolicLink, resolveFile, startMultipartUpload, supportsMultipartTransfers, symlinkFrom
-
Field Details
-
f
-
homeDir
-
-
Constructor Details
-
AbstractDirectFile
public AbstractDirectFile(String path, AbstractFileFactory<T> fileFactory, File homeDir) throws IOException - Throws:
IOException
-
-
Method Details
-
exists
public boolean exists() -
createFolder
- Throws:
PermissionDeniedException
-
lastModified
public long lastModified() -
getName
-
length
public long length() -
getAttributes
- Throws:
IOException
-
isDirectory
public boolean isDirectory() -
isFile
public boolean isFile() -
getAbsolutePath
- Throws:
IOException
-
isReadable
public boolean isReadable() -
isWritable
public boolean isWritable() -
createNewFile
- Throws:
PermissionDeniedExceptionIOException
-
truncate
- Throws:
PermissionDeniedExceptionIOException
-
getInputStream
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
delete
public boolean delete(boolean recurse) -
moveTo
- Throws:
IOExceptionPermissionDeniedException
-
setAttributes
- Throws:
IOException
-
getCanonicalPath
- Throws:
IOException
-
supportsRandomAccess
public boolean supportsRandomAccess() -
openFile
- Throws:
IOException
-
isHidden
public boolean isHidden() -
refresh
public void refresh() -
doHashCode
protected int doHashCode()- Specified by:
doHashCodein classAbstractFileImpl<T extends AbstractDirectFile<T>>
-
doEquals
- Specified by:
doEqualsin classAbstractFileImpl<T extends AbstractDirectFile<T>>
-