Hi all,

I'm trying to read a file in my plugin, but have come across an issue. The 
Jenkins server is on a windows machine and the agent the job is being run 
on is Linux. I have a string with the full file path, but when I create a 
File object needed for the FilePath object it converts the '/' into '\\' 
which means it cant find the file. The code and an example:

String pathTo = "/some/path/to/a/file.txt";
FilePath file = new FilePath(new File(pathTo));

Resulting in: "\some\path\to\a\file.txt (The system cannot find the path 
specified)"

It seems its automatically converting the file separators? How do I go 
about reading this file?

Cheers..

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to