PageRenderTime 137ms CodeModel.GetById 136ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1
 2bsh.help.rm = "usage: cd( path )";
 3
 4rm( String pathname ) {
 5    file = pathToFile( pathname );
 6
 7	if ( file == null )
 8		throw new java.io.FileNotFoundException("pathname");
 9
10    if ( file.isDirectory() ) {
11        print( pathname + "is a directory" );
12        return;
13    }
14
15	return file.delete();
16}
17