File: dowalkroot.cpp

package info (click to toggle)
dpuser 4.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,628 kB
  • sloc: cpp: 148,693; ansic: 18,648; fortran: 5,815; lex: 1,116; makefile: 760; yacc: 741; sh: 390; pascal: 98
file content (22 lines) | stat: -rw-r--r-- 392 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "osdir.h"
#include <iostream>

void walk(const std::string& aDir, const std::string& aName)
{
	std::string Full = aDir+'\\'+aName;
	if (aName == "")
		Full = aDir;
	std::cout << Full << std::endl;
	if ( (aName != ".") && (aName != "..") )
	{
		oslink::directory cur(Full);
		while (cur)
			walk(Full,cur.next());
	}
}

int main()
{
	walk("c:","");
	return 0;
}