Helper method to replace all occurrences of "\" with "\\" in a string. This is useful to fix the file path string on Windows where "\" is used as the path separator. @param str Any string @return The resulting string
(String str)
| 770 | * @return The resulting string |
| 771 | */ |
| 772 | public static String encodeEscape(String str) { |
| 773 | String regex = "\\\\"; |
| 774 | String replacement = quoteReplacement("\\\\"); |
| 775 | return str.replaceAll(regex, replacement); |
| 776 | } |
| 777 | |
| 778 | public static String generateURI(String filename, PigContext context) |
| 779 | throws IOException { |
no outgoing calls
no test coverage detected