i am reading svn contents using GetList method of svnClient class, i want to know how can i determine the full size of directory including sub directories, i can read the size using FileSize property of SvnListEventArgs.
+2
A:
You have to do it recursively. Scan each directory, add up all the sizes of files in that directory plus the sizes of each subdirectory. Your function should recurse until a particular directory has no more subdirectories.
Michael Hackner
2010-01-26 12:51:23
yes, but i am looking for a direct method as each directory contains massive data, and i need the size over and over. Recursion will be costly.
Shahbaz
2010-01-27 05:19:55
A:
I have the same problem than you Shahbaz. It takes several minutes to traverse directories and subdirectories to find the total size of the repository. Have you found any solution?
Jesús
2010-10-19 10:28:54
I checked out repository to working directory, then traversed locally to calculate the size, it solved my problem.
Shahbaz
2010-10-20 13:31:24
A:
I generated a code that consults the entire contents of a repository (400 files) to estimate its size. This takes about two minutes:
/ / This is the line of code that spends nearly two-minute process
client.GetPropertyList (targetSource, args, out proplist)
/ / Only interested me the size of each of the files in folders and subfolders of the repository
Does anyone know a way to do the process more fast?
I have also noticed that omitted text files (.txt).
Someone knows what be caused this fail?
Thanks in advance!!
Jesús
2010-10-26 06:30:32