Skip to content

Commit

Permalink
DFS using C
Browse files Browse the repository at this point in the history
  • Loading branch information
saggu10417 committed Oct 29, 2018
1 parent d372f5a commit b044f5a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Graphs/DFS.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import java.io.File;

class FileUtils
{
public static void listFilesRecursive(File root)
{
File[] listOfFilesAndDirectory = root.listFiles();

if (listOfFilesAndDirectory != null)
{
for (File file : listOfFilesAndDirectory)
{
if (file.isDirectory()) {
listFilesRecursive(file);
}
else {
System.out.println(file);
}
}
}
}

public static void main(String args[])
{
String dir = "C:\\Users";
File rootDir = new File(dir);

listFilesRecursive(rootDir);
}
}
Binary file added Graphs/FileUtils.class
Binary file not shown.

1 comment on commit b044f5a

@saggu10417
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DFS is done using java #3

Please sign in to comment.