(PigContext pigContext, String fileName)
| 505 | } |
| 506 | |
| 507 | static public boolean exists(PigContext pigContext, String fileName) |
| 508 | throws IOException { |
| 509 | Configuration conf = ConfigurationUtil.toConfiguration( |
| 510 | pigContext.getProperties()); |
| 511 | FileSystem fs = FileSystem.get(conf); |
| 512 | if(Util.WINDOWS){ |
| 513 | fileName = fileName.replace('\\','/'); |
| 514 | } |
| 515 | return fs.exists(new Path(fileName)); |
| 516 | } |
| 517 | |
| 518 | /** |
| 519 | * Helper function to check if the result of a Pig Query is in line with |
no test coverage detected