SharpSVN read ALL filenames

KevinDeus picture KevinDeus · Jun 30, 2009 · Viewed 9.4k times · Source

still a bit of a n00b on SharpSVN, I'm looking to get some simple code to open up an SVN repository, and read (at least) the full path of all files in a specific folder.

Lets say that this folder is \trunk\source

I'm not looking to checkout or commit, just read into a list

I'm also looking to read ALL files, not just the changed ones.

Answer

KevinDeus picture KevinDeus · Jun 30, 2009

ok it looks like I found a method..

        bool gotList;
        List<string> files = new List<string>();

        using (SvnClient client = new SvnClient())
        {
            Collection<SvnListEventArgs> list;

            gotList = client.GetList(projectPath, out list);

            if (gotList)
            {
                foreach (SvnListEventArgs item in list)
                {
                    files.Add(item.Path);
                }
            }
        }