How to use File tree in CustomTask

Hi, I have a custom task in Gradle. I would like to use file tree inside it.
I am trying somethig like below. But I am getting error while running the task.
Please let me know where am I going wrong.

task myTask(type: MyTask){

class MyTask extends DefaultTask{
void parse() {
FileTree tree = Project.fileTree(dir: ‘D:/Gradle_project’,includes: [".txt","//.txt"], excludes: ["/dheeraj/"])
def currentjws=file.relativePath