source: trunk/j/src/bsh/commands/rm.bsh @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 301 bytes
Line 
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
Note: See TracBrowser for help on using the repository browser.