Delete a file. @param filename to delete @return true @throws IOException
(String filename)
| 1265 | * @throws IOException |
| 1266 | */ |
| 1267 | public boolean deleteFile(String filename) throws IOException { |
| 1268 | // Check if this operation is permitted |
| 1269 | filter.validate(PigCommandFilter.Command.RM); |
| 1270 | filter.validate(PigCommandFilter.Command.RMF); |
| 1271 | |
| 1272 | ElementDescriptor elem = pigContext.getDfs().asElement(filename); |
| 1273 | elem.delete(); |
| 1274 | return true; |
| 1275 | } |
| 1276 | |
| 1277 | /** |
| 1278 | * Rename a file. |