Search code examples
c#svnfilesharpsvn

SharpSVN read ALL filenames


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.


Solution

  • 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);
                    }
                }
            }