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
Want to see how PrivX can help your organisation? Are you a DEVELOPER accessing cloud hosts, are you a IT ADMIN managing access & credentials in your corporation, are you BUSINESS MANAGER and want to save money or are you responsible of IT SECURITY in DevOps 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