/jEdit/tags/jedit-4-0-pre5/bsh/commands/rm.bsh
# · Unknown · 17 lines · 11 code · 6 blank · 0 comment · 0 complexity · 456a26fee044fc125f07c7a67d499f16 MD5 · raw file
- bsh.help.rm = "usage: cd( path )";
- rm( String pathname ) {
- file = pathToFile( pathname );
- if ( file == null )
- throw new java.io.FileNotFoundException("pathname");
- if ( file.isDirectory() ) {
- print( pathname + "is a directory" );
- return;
- }
- return file.delete();
- }