Package com.sshtools.common.files.direct
Class NioFile
java.lang.Object
com.sshtools.common.files.direct.NioFile
- All Implemented Interfaces:
AbstractFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(AbstractFile src) booleanbooleanbooleandelete(boolean recursive) protected SftpFileAttributesbooleanbooleanexists()booleangetName()getOutputStream(boolean append) inthashCode()booleanbooleanisFile()booleanisHidden()booleanbooleanlonglonglength()voidvoidvoidmoveTo(AbstractFile target) open(com.sshtools.common.util.UnsignedInteger32 flags, Optional<com.sshtools.common.util.UnsignedInteger32> accessFlags, byte[] handle) openFile(boolean writeAccess) voidrefresh()resolveFile(String child) voidsetAttributes(SftpFileAttributes attrs) booleanvoidsymlinkFrom(String target) voidtoString()voidtruncate()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sshtools.common.files.AbstractFile
startMultipartUpload, supportsMultipartTransfers
-
Field Details
-
SSH_FXE_STATVFS_ST_RDONLY
public static final int SSH_FXE_STATVFS_ST_RDONLY- See Also:
-
SSH_FXE_STATVFS_ST_NOSUID
public static final int SSH_FXE_STATVFS_ST_NOSUID- See Also:
-
-
Method Details
-
existsNoFollowLinks
- Specified by:
existsNoFollowLinksin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
linkTo
- Specified by:
linkToin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
linkFrom
- Specified by:
linkFromin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
symlinkTo
- Specified by:
symlinkToin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
symlinkFrom
- Specified by:
symlinkFromin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
readSymbolicLink
- Specified by:
readSymbolicLinkin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getName
- Specified by:
getNamein interfaceAbstractFile
-
getInputStream
- Specified by:
getInputStreamin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
exists
- Specified by:
existsin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getChildren
- Specified by:
getChildrenin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getAbsolutePath
- Specified by:
getAbsolutePathin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getParentFile
- Specified by:
getParentFilein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isDirectory
- Specified by:
isDirectoryin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isFile
- Specified by:
isFilein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getOutputStream
- Specified by:
getOutputStreamin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isHidden
- Specified by:
isHiddenin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
createFolder
- Specified by:
createFolderin interfaceAbstractFile- Throws:
PermissionDeniedExceptionIOException
-
isReadable
- Specified by:
isReadablein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
copyFrom
- Specified by:
copyFromin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
moveTo
- Specified by:
moveToin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
delete
- Specified by:
deletein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getAttributesNoFollowLinks
public SftpFileAttributes getAttributesNoFollowLinks() throws FileNotFoundException, IOException, PermissionDeniedException- Specified by:
getAttributesNoFollowLinksin interfaceAbstractFile- Throws:
FileNotFoundExceptionIOExceptionPermissionDeniedException
-
getAttributes
public SftpFileAttributes getAttributes() throws FileNotFoundException, IOException, PermissionDeniedException- Specified by:
getAttributesin interfaceAbstractFile- Throws:
FileNotFoundExceptionIOExceptionPermissionDeniedException
-
open
public OpenFile open(com.sshtools.common.util.UnsignedInteger32 flags, Optional<com.sshtools.common.util.UnsignedInteger32> accessFlags, byte[] handle) throws IOException, PermissionDeniedException - Specified by:
openin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
doGetAttributes
- Throws:
FileNotFoundExceptionIOException
-
refresh
public void refresh()- Specified by:
refreshin interfaceAbstractFile
-
lastModified
- Specified by:
lastModifiedin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
length
- Specified by:
lengthin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
isWritable
- Specified by:
isWritablein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
createNewFile
- Specified by:
createNewFilein interfaceAbstractFile- Throws:
PermissionDeniedExceptionIOException
-
truncate
- Specified by:
truncatein interfaceAbstractFile- Throws:
PermissionDeniedExceptionIOException
-
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
-
getOutputStream
- Specified by:
getOutputStreamin interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
resolveFile
- Specified by:
resolveFilein interfaceAbstractFile- Throws:
IOExceptionPermissionDeniedException
-
getFileFactory
- Specified by:
getFileFactoryin interfaceAbstractFile
-
hashCode
public int hashCode() -
equals
-
toString
-
getVolume
- Specified by:
getVolumein interfaceAbstractFile- Throws:
IOException
-