Your browser does not allow storing cookies. We recommend enabling them.
com.ssh.sft Class DirHandle
All Implemented Interfaces: Iterator, SftLibConstants public class DirHandle extends com.ssh.sft.ObjectBase implements Iterator
An iterator over directory contents. A DirHandle is used to traverse once through the contents of a directory. It can be used via the standard
interface, or with the
method. The system resources reserved by a DirHandle object are freed when all entries are iterated, when the object is garbage collected, or when
ObjectBase.close() is called, whichever comes first.
() close Releases the resources used by this object.
() hasNext Tests if there are more directory entries still available.
() isClosed Tests if this object has been closed.
Object () next Returns the next entry in this directory.
File () nextEntry Returns the next entry in this directory.
() remove Removes from this directory the last file that was returned by or
public boolean hasNext() Tests if there are more directory entries still available. Specified by:
hasNext Iterator Returns: true if calling will return another entry
public Object next() Returns the next entry in this directory. Specified by:
next Iterator Returns: the next unread entry in this directory Throws:
- if there are no more entries available
public File nextEntry()
throws SftException Returns the next entry in this directory. Returns: the next unread entry in this directory, or null if there are no more entries Throws: SftException remove
public void remove() Removes from this directory the last file that was returned by or
remove Iterator close
public void close()
throws SftException Releases the resources used by this object. After this method has been called, all further operations on this object will throw a .
Throws: SftException isClosed
public boolean isClosed() Tests if this object has been closed. Returns: true if
ObjectBase.close() has been called on this object, false otherwise
Reduce Secure Shell risk. Get to know the NIST 7966. The NISTIR 7966 guideline from the Computer Security Division of NIST is a direct call to action for organizations regardless of industry and is a mandate for the US Federal government. Download now ISACA Practitioner Guide for SSH With contributions from practitioners, specialists and SSH.COM experts, the ISACA “SSH: Practitioner Considerations” guide is vital best practice from the compliance and audit community. Download now What we recommend to read next: Regulatory compliance for cybersecurity? Privileged access management related information NEAREST SSH.COM OFFICE SSH Communications Security, Inc. 460 Totten Pond Road #460 Waltham, MA 02140 USA 781-247-2100 Contact us