Mercurial > jhg
comparison src/org/tmatesoft/hg/util/FileIterator.java @ 350:33eaed1ad130
Allow FileIterator report any errors from the underlaying file system up to the client
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Tue, 29 Nov 2011 03:46:17 +0100 |
| parents | ed6b74a58c66 |
| children | 7f27122011c3 |
comparison
equal
deleted
inserted
replaced
| 349:bba9f52cacf3 | 350:33eaed1ad130 |
|---|---|
| 14 * the terms of a license other than GNU General Public License | 14 * the terms of a license other than GNU General Public License |
| 15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
| 16 */ | 16 */ |
| 17 package org.tmatesoft.hg.util; | 17 package org.tmatesoft.hg.util; |
| 18 | 18 |
| 19 import java.io.IOException; | |
| 20 | |
| 19 import org.tmatesoft.hg.internal.Experimental; | 21 import org.tmatesoft.hg.internal.Experimental; |
| 20 | 22 |
| 21 /** | 23 /** |
| 22 * Abstracts iteration over file system. | 24 * Abstracts iteration over file system. |
| 23 * | 25 * |
| 27 public interface FileIterator { | 29 public interface FileIterator { |
| 28 | 30 |
| 29 /** | 31 /** |
| 30 * Brings iterator into initial state to facilitate new use. | 32 * Brings iterator into initial state to facilitate new use. |
| 31 */ | 33 */ |
| 32 void reset(); | 34 void reset() throws IOException; |
| 33 | 35 |
| 34 /** | 36 /** |
| 35 * @return whether can shift to next element | 37 * @return whether can shift to next element |
| 36 */ | 38 */ |
| 37 boolean hasNext(); | 39 boolean hasNext() throws IOException; |
| 38 | 40 |
| 39 /** | 41 /** |
| 40 * Shift to next element | 42 * Shift to next element |
| 41 */ | 43 */ |
| 42 void next(); | 44 void next() throws IOException; |
| 43 | 45 |
| 44 /** | 46 /** |
| 45 * @return repository-local path to the current element. | 47 * @return repository-local path to the current element. |
| 46 */ | 48 */ |
| 47 Path name(); | 49 Path name(); |
