Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Listing the contents of a directory.

Hi all,

I've been trying to see a treeWalk instance to walk over a directory
structure. I'm able to list commits, but when it comes to walking the
file structure for a particular rev I've been having trouble.

 I've created in a simple repo with a test directory and 2 files
underneath (test1.txt and test2.txt).
I'm using TreeWalk.forPath() and I can read in a single file's
contents however if the path is a directory (with 2 files under it) I
cannot list the contents of the directory. When I fall
it returns false as if there are no files contained in this directory.

Is this the right way to list the contents of a directory for a
particular revision?



Back to the top