fireberd350
14 years agoNew Contributor
Managing file paths for Windows and Unix users: / vs. \
Our testers all use Windows and Devs all use Unix. When the testers write the testcases they use relative paths with Windows style backslashes, ${projectDir}\\path\\to\\file.txt , but this doesn't work when the Dev try to use our projects as require Unix style paths, ${projectDir}/path/to/file.txt. Anyone have a solution for this? I've thought about making a project level property called pathSeperator and set it to \\ for our testers and when devs checkout they can switch to /. This would require referencing the ${#Project#pathSeperator} for every directory level in every path though and that seems like an inefficient solution.
e.g. ${projectDir}${#Project#pathSeperator}path${#Project#pathSeperator}to${#Project#pathSeperator}file.txt
Thanks in advance.
e.g. ${projectDir}${#Project#pathSeperator}path${#Project#pathSeperator}to${#Project#pathSeperator}file.txt
Thanks in advance.