Class DirectoryHandle

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.Channel, java.util.Iterator<java.nio.file.Path>, AttributeRepository, AttributeStore

    public class DirectoryHandle
    extends Handle
    implements java.util.Iterator<java.nio.file.Path>
    • Field Detail

      • done

        private boolean done
      • sendDotDot

        private boolean sendDotDot
      • sendDot

        private boolean sendDot
      • ds

        private java.nio.file.DirectoryStream<java.nio.file.Path> ds
      • fileList

        private java.util.Iterator<java.nio.file.Path> fileList
    • Constructor Detail

      • DirectoryHandle

        public DirectoryHandle​(SftpSubsystem subsystem,
                               java.nio.file.Path dir,
                               java.lang.String handle)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • isDone

        public boolean isDone()
      • markDone

        public void markDone()
      • isSendDot

        public boolean isSendDot()
      • markDotSent

        public void markDotSent()
      • isSendDotDot

        public boolean isSendDotDot()
      • markDotDotSent

        public void markDotDotSent()
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.nio.file.Path>
      • next

        public java.nio.file.Path next()
        Specified by:
        next in interface java.util.Iterator<java.nio.file.Path>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.nio.file.Path>
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class Handle
        Throws:
        java.io.IOException