0

We recently changed from to . Now I have to change a zip-generator which needs a directory list.

With it was very easy but what is the best way in to get a list of directories in a specific path?

I tried with the stash-api but didn't get an usable result.

Thanks for helping.

Edit: The structure on looks like this. Now I need the directories 1.0.0 - 1.1.1 in to work with.

├── project
│ ├── database
│ │ ├── scripts
│ │ │ ├── 1.0.0
│ │ │ ├── 1.0.1
│ │ │ ├── 1.1.0
│ │ │ └── 1.1.1

Edit2:

Old way

    File file = new File(this.source);
    File[] files = file.listFiles();

this.source = path to svn folder

SQB
  • 3,926
  • 2
  • 28
  • 49
0riginal
  • 137
  • 1
  • 11
  • You mean to say you did this programatically with SVN? – fge Apr 07 '14 at 07:50
  • I used Java to get the list from SVN and it wasn't a problem. But I need the directory list from the Git remote now – 0riginal Apr 07 '14 at 07:55
  • How did you do that with svn? Via an executed command? – fge Apr 07 '14 at 08:07
  • Is there a reason why you need to do this via Java instead of just using some kind of shell script with git's built-in command line interface? –  Apr 07 '14 at 08:15
  • Have you tried looking at [JGit](http://eclipse.org/jgit/) ? – Dror Bereznitsky Apr 07 '14 at 08:26
  • I tried with JGit but it only worked local. How can I do It on the remote? – 0riginal Apr 07 '14 at 08:33
  • Also see: [Java Client to Connect to Stash Repository](http://stackoverflow.com/q/24963084/2936460). – SQB May 15 '15 at 06:56
  • @0riginal Why do you need to do it on the remote? Surely your local repository is as valid a repository as the remote if you've pulled? – Edd May 15 '15 at 07:02

0 Answers0