public final class Cd extends Object
cd - change the working directory
Cd.Interface for the corresponding command signature methods.
The cd utility changes the working directory of the current command execution. If no directory operand is given, the cd utility changes to the user home directory as defined by the execution context (usually the directory specified by the
"user.home" system property). If the cd argument is a
File and it is a directory, the current working directory is changed to the given file (relative paths are not resolved with the current working directory). If a string argument is passed to the cd utility, it is treated as a file argument and relative paths are resolved on the basis of the (old) current working directory. Wildcards are possible if the first matching file represents a directory. If the specified file or path argument does not represent a valid directory, an exception is thrown.
The command supports no options.
The following operands are supported:
|:||the file to use as input; relative paths are not resolved (use the string path argument to enable relative path resolving based on the current working directory).|
|:||the directory to become the new current working directory; wildcards * and ? are supported; relative paths are resolved on the basis of the current working directory.|
|Modifier and Type||Class and Description|
Interface defining all method signatures for the "cd" command.
|Modifier and Type||Field and Description|
The "cd" command name.
Copyright © 2022. All rights reserved.