Mercurial > jhg
comparison src/org/tmatesoft/hg/util/FileIterator.java @ 226:26ad7827a62d
Support status query for a single file or a subdirectory of a repository
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 25 May 2011 12:16:24 +0200 |
parents | 8248aae33f7d |
children | ed6b74a58c66 |
comparison
equal
deleted
inserted
replaced
225:fad70a9e6c7f | 226:26ad7827a62d |
---|---|
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.File; | 19 import java.io.File; |
20 | |
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 * |
24 * @author Artem Tikhomirov | 26 * @author Artem Tikhomirov |
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(); |
48 | 50 |
49 /** | 51 /** |
52 * File object to retrieve actual state from. Not necessarily exist, if {@link FileIterator} is used to query status | |
53 * of specific files. | |
50 * @return filesystem element. | 54 * @return filesystem element. |
51 */ | 55 */ |
52 File file(); | 56 File file(); |
57 | |
58 /** | |
59 * When {@link FileIterator} represents only fraction of a repository, library might need to figure out if | |
60 * specific file (path) belongs to that fraction or not. Paths (and {@link File Files} returned by this {@link FileIterator} | |
61 * are always considered as representing the fraction, nonetheless, {@link FileIterator} shall return true for such names if | |
62 * asked. | |
63 * @return <code>true</code> if this {@link FileIterator} is responsible for (interested in) specified repository-local path | |
64 */ | |
65 @Experimental(reason="Perhaps, shall not be part of FileIterator, but rather separate Path.Matcher. Approaches in regular StatusCollector (doesn't use FI, but supports scope) and WC collector to look similar, and for HgStatusCommand to use single approach to set the scope") | |
66 boolean inScope(Path file); | |
53 } | 67 } |