
bsh.commands.cd.bsh Maven / Gradle / Ivy
/**
Change working directory for dir(), etc. commands (like Unix cd)
*/
bsh.help.cd = "usage: cd( path )";
/*
Additions by Kevin Raulerson, http://www.spin.com.mx/~kevinr/
*/
void cd( String pathname )
{
this.file = pathToFile( pathname );
if ( file.exists() && file.isDirectory() )
bsh.cwd = file.getCanonicalPath();
else
print( "No such directory: "+pathname);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy