001package org.unix4j.unix.ls;
002
003import org.unix4j.unix.Ls;
004
005/**
006 * Options for the {@link Ls ls} command with the 
007 * the following options: 
008 * <p>
009 * <table>
010 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -a}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --allFiles}</td><td>&nbsp;</td><td>Lists all files in the given directory, including hidden files
011                        (those whose names start with \".\" in Unix). By default, these 
012                        files are excluded from the list.</td></tr>
013 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -h}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --humanReadable}</td><td>&nbsp;</td><td>Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)</td></tr>
014 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -l}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --longFormat}</td><td>&nbsp;</td><td>Long format, displaying file types, permissions, number of hard 
015                        links, owner, group, size, date, and filename.</td></tr>
016 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -R}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --recurseSubdirs}</td><td>&nbsp;</td><td>Recursively lists subdirectories encountered.</td></tr>
017 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -r}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --reverseOrder}</td><td>&nbsp;</td><td>Reverses the order of the sort to get reverse collating sequence or 
018                        oldest first.</td></tr>
019 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -t}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --timeSorted}</td><td>&nbsp;</td><td>Sorts with the primary key being time modified (most recently 
020                        modified first) and the secondary key being filename in the 
021                        collating sequence.</td></tr>
022 * </table>
023 * <p>
024 * This class serves as entry point to every possible set of {@code ls} options
025 * defined as an enum constant. With this explicit expansion of all possible 
026 * option combinations, options can be passed to the command in a very compact 
027 * form, such as:
028 * <pre>
029 * ls(Ls.Options.a, ...);
030 * ls(Ls.Options.a.h, ...);
031 * ...
032 * ls(Ls.Options.a.h.l.R.r.t, ...);
033 * </pre>
034 */
035public final class LsOptionSets {
036        /**
037         * The singleton instance.
038         */
039        public static final LsOptionSets INSTANCE = new LsOptionSets();
040        
041        /**
042         * Option {@code "-a"}: Lists all files in the given directory, including hidden files
043                        (those whose names start with \".\" in Unix). By default, these 
044                        files are excluded from the list.
045         * <p>
046         * The option {@code "-a"} is equivalent to the {@code "--}{@link #allFiles allFiles}{@code "} option.
047         */
048        public final LsOptionSet_Rahlrt a = LsOptionSet_Rahlrt.Active_a;  
049        /**
050         * Option {@code "--allFiles"}: Lists all files in the given directory, including hidden files
051                        (those whose names start with \".\" in Unix). By default, these 
052                        files are excluded from the list.
053         * <p>
054         * The option {@code "--allFiles"} is equivalent to the {@code "-}{@link #a a}{@code "} option.
055         */
056        public final LsOptionSet_Rahlrt allFiles = LsOptionSet_Rahlrt.Active_a_long;  
057        /**
058         * Option {@code "-h"}: Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
059         * <p>
060         * The option {@code "-h"} is equivalent to the {@code "--}{@link #humanReadable humanReadable}{@code "} option.
061         */
062        public final LsOptionSet_Rahlrt h = LsOptionSet_Rahlrt.Active_h;  
063        /**
064         * Option {@code "--humanReadable"}: Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
065         * <p>
066         * The option {@code "--humanReadable"} is equivalent to the {@code "-}{@link #h h}{@code "} option.
067         */
068        public final LsOptionSet_Rahlrt humanReadable = LsOptionSet_Rahlrt.Active_h_long;  
069        /**
070         * Option {@code "-l"}: Long format, displaying file types, permissions, number of hard 
071                        links, owner, group, size, date, and filename.
072         * <p>
073         * The option {@code "-l"} is equivalent to the {@code "--}{@link #longFormat longFormat}{@code "} option.
074         */
075        public final LsOptionSet_Rahlrt l = LsOptionSet_Rahlrt.Active_l;  
076        /**
077         * Option {@code "--longFormat"}: Long format, displaying file types, permissions, number of hard 
078                        links, owner, group, size, date, and filename.
079         * <p>
080         * The option {@code "--longFormat"} is equivalent to the {@code "-}{@link #l l}{@code "} option.
081         */
082        public final LsOptionSet_Rahlrt longFormat = LsOptionSet_Rahlrt.Active_l_long;  
083        /**
084         * Option {@code "-R"}: Recursively lists subdirectories encountered.
085         * <p>
086         * The option {@code "-R"} is equivalent to the {@code "--}{@link #recurseSubdirs recurseSubdirs}{@code "} option.
087         */
088        public final LsOptionSet_Rahlrt R = LsOptionSet_Rahlrt.Active_R;  
089        /**
090         * Option {@code "--recurseSubdirs"}: Recursively lists subdirectories encountered.
091         * <p>
092         * The option {@code "--recurseSubdirs"} is equivalent to the {@code "-}{@link #R R}{@code "} option.
093         */
094        public final LsOptionSet_Rahlrt recurseSubdirs = LsOptionSet_Rahlrt.Active_R_long;  
095        /**
096         * Option {@code "-r"}: Reverses the order of the sort to get reverse collating sequence or 
097                        oldest first.
098         * <p>
099         * The option {@code "-r"} is equivalent to the {@code "--}{@link #reverseOrder reverseOrder}{@code "} option.
100         */
101        public final LsOptionSet_Rahlrt r = LsOptionSet_Rahlrt.Active_r;  
102        /**
103         * Option {@code "--reverseOrder"}: Reverses the order of the sort to get reverse collating sequence or 
104                        oldest first.
105         * <p>
106         * The option {@code "--reverseOrder"} is equivalent to the {@code "-}{@link #r r}{@code "} option.
107         */
108        public final LsOptionSet_Rahlrt reverseOrder = LsOptionSet_Rahlrt.Active_r_long;  
109        /**
110         * Option {@code "-t"}: Sorts with the primary key being time modified (most recently 
111                        modified first) and the secondary key being filename in the 
112                        collating sequence.
113         * <p>
114         * The option {@code "-t"} is equivalent to the {@code "--}{@link #timeSorted timeSorted}{@code "} option.
115         */
116        public final LsOptionSet_Rahlrt t = LsOptionSet_Rahlrt.Active_t;  
117        /**
118         * Option {@code "--timeSorted"}: Sorts with the primary key being time modified (most recently 
119                        modified first) and the secondary key being filename in the 
120                        collating sequence.
121         * <p>
122         * The option {@code "--timeSorted"} is equivalent to the {@code "-}{@link #t t}{@code "} option.
123         */
124        public final LsOptionSet_Rahlrt timeSorted = LsOptionSet_Rahlrt.Active_t_long;  
125        
126}