All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bsh.util.commands.cd.bsh Maven / Gradle / Ivy

The newest version!
/**
	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 - 2024 Weber Informatics LLC | Privacy Policy