MCPcopy Create free account
hub / github.com/apache/pig / deleteFile

Method deleteFile

src/org/apache/pig/PigServer.java:1267–1275  ·  view source on GitHub ↗

Delete a file. @param filename to delete @return true @throws IOException

(String filename)

Source from the content-addressed store, hash-verified

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.

Callers 1

Calls 4

deleteMethod · 0.95
getDfsMethod · 0.80
validateMethod · 0.65
asElementMethod · 0.65

Tested by 1