To get the file path from file name in directory I have src/test/resources/datasheets directory.
src/test/resources/datasheets xyz/a1.txt abc/b1/txt
It has many directories again
I need to get the file path If i give the file name
ex : "a1.txt" I need to get as src/test/resources/datasheets/xyz/a1.txt
Thanks in advance
abc/b1/txtsupposed to beabc/b1.txt?maven, which defines a directory for test resources assrc/test/resources? If so, when running your tests, the resources would get copied into the build directory, and the path to thea1.txtresource would actually only bedatasheets/xyz/a1.txt