I'm working in Maven web application (Java). I need to read a directory (for ex: mydirectory) in my webapp folder as follows:

```
File file = new File("path of my directory");

```

I just specify the hierarchy of folders in my application.

```
MyApplication->src->main->webapp->MyDirectory

```

But I'm going to write my Java code I the package as follows,

```
MyApplication->src->main->java->com->mypackage->myfile.java

```

From myfile.java I need to read the directory "MyDirectory" in webapp. As new File("path of the directory")

But I don't know how to specify the path of the directory here.