How do I list all of the sub directories in C#? -


this question has answer here:

i have directory 30 sub directory files in "c:\school\grad school (comp sci)\thesis\apps". how list of sub directories in srcml.net?

[testcase] public void calculatesimpleprojectstats() {     var dataproject = new dataproject<completeworkingset>("android apps",         path.getfullpath(@"c:\school\grad school (comp sci)\thesis\apps\accelerometer-app-master"),         "..//..//..//srcml");     debug.writeline("parsing android-pedometer-studio....");      dataproject.updateasync().wait();      namespacedefinition globalnamespace;     assert.that(dataproject.workingset.tryobtainreadlock(5000, out globalnamespace));      displaysensortypes(globalnamespace);     //displaywhetherappisunittested();                displaycallstoonsensorchanged(globalnamespace);             } 

you use getdirectories method of directoryinfo class:

var di = new directoryinfo("..//..//..//srcml"); var subdirectories = di.getdirectories(); 

the method called current directory, automatically find correct path.

if want retrieve all subdirectories (subdirectory of subdirectory , on) srcml directory, have @ so answer @aquinas posted in comment question.


Popular posts from this blog