(String fileSpec, PigContext pigContext)
| 418 | } |
| 419 | |
| 420 | static public boolean delete(String fileSpec, PigContext pigContext) throws IOException{ |
| 421 | fileSpec = checkDefaultPrefix(pigContext.getExecType(), fileSpec); |
| 422 | ElementDescriptor elem = null; |
| 423 | if (!fileSpec.startsWith(LOCAL_PREFIX)) { |
| 424 | elem = pigContext.getDfs().asElement(fileSpec); |
| 425 | } else { |
| 426 | elem = pigContext.getLfs().asElement(fileSpec); |
| 427 | } |
| 428 | elem.delete(); |
| 429 | return true; |
| 430 | } |
| 431 | |
| 432 | static Random r = new Random(); |
| 433 |