public final class CdFactory extends Object implements Cd.Interface<CdCommand>
cd
command returning
a new command instance from every signature method.Modifier and Type | Field and Description |
---|---|
static CdFactory |
INSTANCE
The singleton instance of this factory.
|
Modifier and Type | Method and Description |
---|---|
CdCommand |
cd()
Changes the current directory to the user home directory as defined
by the execution context (usually the directory specified by the
"user.home" system property). |
CdCommand |
cd(File file)
The current working directory is changed to the given file.
|
CdCommand |
cd(String path)
The current working directory is changed to the given file.
|
public CdCommand cd()
Cd.Interface
"user.home"
system property).cd
in interface Cd.Interface<CdCommand>
<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailspublic CdCommand cd(File file)
Cd.Interface
cd
in interface Cd.Interface<CdCommand>
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).<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailspublic CdCommand cd(String path)
Cd.Interface
cd
in interface Cd.Interface<CdCommand>
path
- 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.<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsCopyright © 2024. All rights reserved.