Commit 576aaa85 authored by Gudipaty Aniket's avatar Gudipaty Aniket

Modified tree backend

parent 0f54208a
...@@ -28,11 +28,16 @@ function dirToArray($dir) ...@@ -28,11 +28,16 @@ function dirToArray($dir)
$result["dirs"][$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value); $result["dirs"][$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value);
} }
else else
{
$ext = pathinfo($value, PATHINFO_EXTENSION);
if((strcmp($ext, "java") == 0) || (strcmp($ext, "cpp") == 0) || (strcmp($ext, "py") == 0))
{ {
array_push($result["files"], $value); array_push($result["files"], $value);
} }
} }
} }
}
return $result; return $result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment