PageRenderTime 146ms CodeModel.GetById 26ms app.highlight 1ms RepoModel.GetById 118ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/bsh/commands/cd.bsh

#
Unknown | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | df823e5efaae63578c5cab2ab03ae594 MD5 | raw file
 1/**
 2	Change working directory for dir(), etc. commands (like Unix cd)
 3*/
 4
 5bsh.help.cd = "usage: cd( path )";
 6
 7/*
 8	Additions by Kevin Raulerson, http://www.spin.com.mx/~kevinr/
 9*/
10void cd( String pathname ) 
11{
12    this.file = pathToFile( pathname );
13
14	if ( file.exists() && file.isDirectory() )
15		bsh.cwd = file.getCanonicalPath();
16	else
17        print( "No such directory: "+pathname);
18}
19