Mercurial > hg4j
diff src/org/tmatesoft/hg/util/FileIterator.java @ 287:ed6b74a58c66
Use FileInfo abstraction with necessary subset of File functionality instead of File to facilitate other effective file system iterators
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 07 Sep 2011 09:33:27 +0200 |
parents | 26ad7827a62d |
children | 33eaed1ad130 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/FileIterator.java Sat Sep 03 22:06:16 2011 +0200 +++ b/src/org/tmatesoft/hg/util/FileIterator.java Wed Sep 07 09:33:27 2011 +0200 @@ -16,8 +16,6 @@ */ package org.tmatesoft.hg.util; -import java.io.File; - import org.tmatesoft.hg.internal.Experimental; /** @@ -49,15 +47,15 @@ Path name(); /** - * File object to retrieve actual state from. Not necessarily exist, if {@link FileIterator} is used to query status - * of specific files. - * @return filesystem element. + * {@link FileInfo} object to retrieve actual file information. Caller shall not assume new instance for each {@link #next()} entry, + * implementors of this interface may reuse {@link FileInfo} instance if deemed suitable. + * @return file information holder. */ - File file(); + FileInfo file(); /** * When {@link FileIterator} represents only fraction of a repository, library might need to figure out if - * specific file (path) belongs to that fraction or not. Paths (and {@link File Files} returned by this {@link FileIterator} + * specific file (path) belongs to that fraction or not. Paths and files returned by this {@link FileIterator} * are always considered as representing the fraction, nonetheless, {@link FileIterator} shall return true for such names if * asked. * @return <code>true</code> if this {@link FileIterator} is responsible for (interested in) specified repository-local path