All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unix4j.unix.ls.LsOptionSets Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
package org.unix4j.unix.ls;

import org.unix4j.unix.Ls;

/**
 * Options for the {@link Ls ls} command with the 
 * the following options: 
 * 

*

* * * * * * *
{@code -a}  {@code --allFiles} Lists all files in the given directory, including hidden files (those whose names start with \".\" in Unix). By default, these files are excluded from the list.
{@code -h}  {@code --humanReadable} Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
{@code -l}  {@code --longFormat} Long format, displaying file types, permissions, number of hard links, owner, group, size, date, and filename.
{@code -R}  {@code --recurseSubdirs} Recursively lists subdirectories encountered.
{@code -r}  {@code --reverseOrder} Reverses the order of the sort to get reverse collating sequence or oldest first.
{@code -t}  {@code --timeSorted} Sorts with the primary key being time modified (most recently modified first) and the secondary key being filename in the collating sequence.
*

* This class serves as entry point to every possible set of {@code ls} options * defined as an enum constant. With this explicit expansion of all possible * option combinations, options can be passed to the command in a very compact * form, such as: *

 * ls(Ls.Options.a, ...);
 * ls(Ls.Options.a.h, ...);
 * ...
 * ls(Ls.Options.a.h.l.R.r.t, ...);
 * 
*/ public final class LsOptionSets { /** * The singleton instance. */ public static final LsOptionSets INSTANCE = new LsOptionSets(); /** * Option {@code "-a"}: Lists all files in the given directory, including hidden files (those whose names start with \".\" in Unix). By default, these files are excluded from the list. *

* The option {@code "-a"} is equivalent to the {@code "--}{@link #allFiles allFiles}{@code "} option. */ public final LsOptionSet_Rahlrt a = LsOptionSet_Rahlrt.Active_a; /** * Option {@code "--allFiles"}: Lists all files in the given directory, including hidden files (those whose names start with \".\" in Unix). By default, these files are excluded from the list. *

* The option {@code "--allFiles"} is equivalent to the {@code "-}{@link #a a}{@code "} option. */ public final LsOptionSet_Rahlrt allFiles = LsOptionSet_Rahlrt.Active_a_long; /** * Option {@code "-h"}: Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.) *

* The option {@code "-h"} is equivalent to the {@code "--}{@link #humanReadable humanReadable}{@code "} option. */ public final LsOptionSet_Rahlrt h = LsOptionSet_Rahlrt.Active_h; /** * Option {@code "--humanReadable"}: Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.) *

* The option {@code "--humanReadable"} is equivalent to the {@code "-}{@link #h h}{@code "} option. */ public final LsOptionSet_Rahlrt humanReadable = LsOptionSet_Rahlrt.Active_h_long; /** * Option {@code "-l"}: Long format, displaying file types, permissions, number of hard links, owner, group, size, date, and filename. *

* The option {@code "-l"} is equivalent to the {@code "--}{@link #longFormat longFormat}{@code "} option. */ public final LsOptionSet_Rahlrt l = LsOptionSet_Rahlrt.Active_l; /** * Option {@code "--longFormat"}: Long format, displaying file types, permissions, number of hard links, owner, group, size, date, and filename. *

* The option {@code "--longFormat"} is equivalent to the {@code "-}{@link #l l}{@code "} option. */ public final LsOptionSet_Rahlrt longFormat = LsOptionSet_Rahlrt.Active_l_long; /** * Option {@code "-R"}: Recursively lists subdirectories encountered. *

* The option {@code "-R"} is equivalent to the {@code "--}{@link #recurseSubdirs recurseSubdirs}{@code "} option. */ public final LsOptionSet_Rahlrt R = LsOptionSet_Rahlrt.Active_R; /** * Option {@code "--recurseSubdirs"}: Recursively lists subdirectories encountered. *

* The option {@code "--recurseSubdirs"} is equivalent to the {@code "-}{@link #R R}{@code "} option. */ public final LsOptionSet_Rahlrt recurseSubdirs = LsOptionSet_Rahlrt.Active_R_long; /** * Option {@code "-r"}: Reverses the order of the sort to get reverse collating sequence or oldest first. *

* The option {@code "-r"} is equivalent to the {@code "--}{@link #reverseOrder reverseOrder}{@code "} option. */ public final LsOptionSet_Rahlrt r = LsOptionSet_Rahlrt.Active_r; /** * Option {@code "--reverseOrder"}: Reverses the order of the sort to get reverse collating sequence or oldest first. *

* The option {@code "--reverseOrder"} is equivalent to the {@code "-}{@link #r r}{@code "} option. */ public final LsOptionSet_Rahlrt reverseOrder = LsOptionSet_Rahlrt.Active_r_long; /** * Option {@code "-t"}: Sorts with the primary key being time modified (most recently modified first) and the secondary key being filename in the collating sequence. *

* The option {@code "-t"} is equivalent to the {@code "--}{@link #timeSorted timeSorted}{@code "} option. */ public final LsOptionSet_Rahlrt t = LsOptionSet_Rahlrt.Active_t; /** * Option {@code "--timeSorted"}: Sorts with the primary key being time modified (most recently modified first) and the secondary key being filename in the collating sequence. *

* The option {@code "--timeSorted"} is equivalent to the {@code "-}{@link #t t}{@code "} option. */ public final LsOptionSet_Rahlrt timeSorted = LsOptionSet_Rahlrt.Active_t_long; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy