public final class Cd extends Object
NAME
cd - change the working directory
SYNOPSIS
cd | |
cd <file> | |
cd <path> |
See Cd.Interface
for the corresponding command signature methods.
DESCRIPTION
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.
See also:
Options
The command supports no options.
OPERANDS
The following operands are supported:
<file> | : | java.io.File | 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). | ||
<path> | : | String | 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 |
---|---|
static interface |
Cd.Interface<R>
Interface defining all method signatures for the "cd" command.
|
Copyright © 2024. All rights reserved.