Class SMBDirectoryStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<java.nio.file.Path>, java.nio.file.DirectoryStream<java.nio.file.Path>

    public final class SMBDirectoryStream
    extends java.lang.Object
    implements java.nio.file.DirectoryStream<java.nio.file.Path>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.nio.file.DirectoryStream

        java.nio.file.DirectoryStream.Filter<T extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      SMBDirectoryStream​(SMBPath smbPath, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
      Public and internal constructor for SMBDirectoryStream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes the current instance of SMBDirectoryStream.
      java.util.Iterator<java.nio.file.Path> iterator()
      Returns an iterator for content of the directory handled by the current instance of SMBDirectoryStream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • SMBDirectoryStream

        public SMBDirectoryStream​(SMBPath smbPath,
                                  java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
                           throws java.io.IOException
        Public and internal constructor for SMBDirectoryStream.
        Parameters:
        smbPath - The SMBPath for which to open a directory stream.
        filter - An optional filter predicate.
        Throws:
        java.nio.file.NotDirectoryException - If provided SMBPath does not point to a directory.
        java.io.IOException - If something goes wrong while reading the content of the directory.
    • Method Detail

      • iterator

        public java.util.Iterator<java.nio.file.Path> iterator()
        Returns an iterator for content of the directory handled by the current instance of SMBDirectoryStream.
        Specified by:
        iterator in interface java.nio.file.DirectoryStream<java.nio.file.Path>
        Specified by:
        iterator in interface java.lang.Iterable<java.nio.file.Path>
        Returns:
        Iterator containing the content of the directory handled by the current instance of SMBDirectoryStream
      • close

        public void close()
        Closes the current instance of SMBDirectoryStream.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable