Line | |
---|
1 | package net.oni2.svnaccess;
|
---|
2 |
|
---|
3 | import java.util.Vector;
|
---|
4 |
|
---|
5 | import org.tmatesoft.svn.core.ISVNDirEntryHandler;
|
---|
6 | import org.tmatesoft.svn.core.SVNDirEntry;
|
---|
7 | import org.tmatesoft.svn.core.SVNException;
|
---|
8 | import org.tmatesoft.svn.core.SVNNodeKind;
|
---|
9 |
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * Used to get the files in a SVN repository
|
---|
13 | *
|
---|
14 | * @author Christian Illy
|
---|
15 | */
|
---|
16 | public class DirEntryHandler implements ISVNDirEntryHandler {
|
---|
17 |
|
---|
18 | Vector<String> target;
|
---|
19 |
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * Create a new DirEntryHandler with a list to store the found files in.
|
---|
23 | *
|
---|
24 | * @param targetList
|
---|
25 | * Vector used to store the file names
|
---|
26 | */
|
---|
27 | public DirEntryHandler(Vector<String> targetList) {
|
---|
28 | this.target = targetList;
|
---|
29 | }
|
---|
30 |
|
---|
31 | @Override
|
---|
32 | public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException {
|
---|
33 | if (dirEntry.getKind() == SVNNodeKind.FILE)
|
---|
34 | target.add(dirEntry.getURL().getPath());
|
---|
35 | }
|
---|
36 |
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.