Getting relative path of a subfolder under root folder

Hi,
I want to get the relative path or absolute path of a folder/subproject under root project using gradle. Can anyone help me in this?

You probably want Project.file(Object). Eg

File file1 = file('relative/path/to/file1') 
File file2 = rootProject.file('root-relative/path/to/file2') 
println "$file1.absolutePath $file2.absolutePath"