- All Implemented Interfaces:
Command
Implements the 'pwd' (print working directory) builtin command.
-
Constructor Summary
Constructors
Constructs a new PwdCommand instance.
-
Method Summary
Prints the current directory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PwdCommand
public PwdCommand()
Constructs a new PwdCommand instance. Initializes the built-in 'pwd' command.
-
Method Details
-
execute
Prints the current directory.
- Specified by:
execute in interface Command
- Parameters:
args - The command and its arguments.
rawInput - The raw input string.
currentDirectory - The current working directory.
- Returns:
- The current directory (unchanged).