Search code examples
c#filesizesharpsvnsvn-server

How to get file size with SharpSvn?


I'm working on module which displays repository content on a web page, using SharpSvn (C#). In order the get the list of the url's content I'm using:

(client.GetList(new Uri(url), out contents);
foreach (SvnListEventArgs item in contents)
{
    //...Iterates...
}

So for each item I get the information about name, path, url... But I also need to know it's size. So is there any way to get this information from the svn server, using SharpSvn?

Thanks.

EDIT: DJ KRAZE's answer made me realize my question wasn't clear enough. The product is a Dropbx-like website, where all the svn (authorized) users can see and browse the repository on the web. So this code should run on the svn server. For example - a user adds files from it's own PC (with tortoise, e.g), and commit. Later he wants to see these files on the web (again, just like dropbox), along with their sizes. Does sharpsvn provides this functionality?


Solution

  • Subversion doesn't offer a way to get the file size. The only way to do this would be to run Export and check the file size, but that would be rather expensive for a dir listing..