public final class LsFactory extends Object implements Ls.Interface<LsCommand>
ls
command returning
a new command instance from every signature method.Modifier and Type | Field and Description |
---|---|
static LsFactory |
INSTANCE
The singleton instance of this factory.
|
Modifier and Type | Method and Description |
---|---|
LsCommand |
ls()
Lists all files and directories in the user's current working
directory and writes them to the output.
|
LsCommand |
ls(File... files)
Prints the name of the given files and lists all files contained in
directories for every directory in
files . |
LsCommand |
ls(LsOptions options)
Lists all files and directories in the user's current working
directory and writes them to the output using the given options
specifying the details of the output format.
|
LsCommand |
ls(LsOptions options,
File... files)
Prints the name of the given files and lists all files contained in
directories for every directory in
files . |
LsCommand |
ls(LsOptions options,
String... paths)
Prints the name of the given files and lists all files contained in
directories for every directory in
files . |
LsCommand |
ls(String... args)
Prints the name of the specified files and lists all files contained
in directories for every directory in those files.
|
public LsCommand ls()
Ls.Interface
ls
in interface Ls.Interface<LsCommand>
<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 LsCommand ls(String... args)
Ls.Interface
Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--paths" operand have to be prefixed with the operand name.
ls
in interface Ls.Interface<LsCommand>
args
- String arguments defining the options and operands for the command.
Options can be specified by acronym (with a leading dash "-") or by
long name (with two leading dashes "--"). Operands other than the
default "--paths" operand have to be prefixed with the operand
name (e.g. "--count" for a subsequent count operand value).<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 LsCommand ls(File... files)
Ls.Interface
files
.ls
in interface Ls.Interface<LsCommand>
files
- The files or directories used as starting point for the listing;
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 LsCommand ls(LsOptions options)
Ls.Interface
ls
in interface Ls.Interface<LsCommand>
options
- The options defining the output format.<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 LsCommand ls(LsOptions options, File... files)
Ls.Interface
files
. The given options
define the details of the output format.ls
in interface Ls.Interface<LsCommand>
options
- The options defining the output format.files
- The files or directories used as starting point for the listing;
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 LsCommand ls(LsOptions options, String... paths)
Ls.Interface
files
. The given options
define the details of the output format.ls
in interface Ls.Interface<LsCommand>
options
- The options defining the output format.paths
- The files or directories used as starting point for the listing;
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.