001package org.unix4j.unix.find;
002
003import org.unix4j.unix.Find;
004
005/**
006 * Options for the {@link Find find} command with the 
007 * the following options: 
008 * <p>
009 * <table>
010 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -d}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --typeDirectory}</td><td>&nbsp;</td><td>Consider only directories</td></tr>
011 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -f}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --typeFile}</td><td>&nbsp;</td><td>Consider only regular files</td></tr>
012 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -l}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --typeSymlink}</td><td>&nbsp;</td><td>Consider only symbolic links</td></tr>
013 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -x}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --typeOther}</td><td>&nbsp;</td><td>Consider only files that are neither of directory (d), 
014                        regular file (f) or symlink (l).</td></tr>
015 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -r}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --regex}</td><td>&nbsp;</td><td>Use full regular expression syntax for the patterns specified by the
016                        name operand
017<p>
018                        (This option is ignored if no name operand is specified).</td></tr>
019 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -i}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --ignoreCase}</td><td>&nbsp;</td><td>Use case insensitive matching when applying the file name pattern
020                        specified by the name operand
021<p>
022                        (This option is ignored if no name operand is specified).</td></tr>
023 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -n}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --timeNewer}</td><td>&nbsp;</td><td>Consider only files that have been created, modified or accessed
024                        after or at the time specified by the time operand (the default)
025                        <p>
026                        (This option is ignored if no time operand is specified).</td></tr>
027 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -o}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --timeOlder}</td><td>&nbsp;</td><td>Consider only files that have been created, modified or accessed
028                        before or at the time specified by the time operand
029                        <p>
030                        (This option is ignored if no time operand is specified).</td></tr>
031 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -c}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --timeCreate}</td><td>&nbsp;</td><td>The time operand refers to the creation time of the file
032                        <p>
033                        (This option is ignored if no time operand is specified).</td></tr>
034 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -a}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --timeAccess}</td><td>&nbsp;</td><td>The time operand refers to the last access time of the file
035                        <p>
036                        (This option is ignored if no time operand is specified).</td></tr>
037 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -m}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --timeModified}</td><td>&nbsp;</td><td>The time operand refers to the last modification time of the file
038                        (the default)
039                        <p>
040                        (This option is ignored if no time operand is specified).</td></tr>
041 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -z}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --print0}</td><td>&nbsp;</td><td>Print the full file name on the standard output, followed by a null 
042                        character (instead of the newline character used by default). This
043                        allows file names that contain newlines or other types of white 
044                        space to be correctly interpreted by programs that process the find 
045                        output. This option corresponds to the --delimiter0 option of xargs.</td></tr>
046 * </table>
047 * <p>
048 * This class serves as entry point to every possible set of {@code find} options
049 * defined as an enum constant. With this explicit expansion of all possible 
050 * option combinations, options can be passed to the command in a very compact 
051 * form, such as:
052 * <pre>
053 * find(Find.Options.d, ...);
054 * find(Find.Options.d.f, ...);
055 * ...
056 * find(Find.Options.d.f.l.x.r.i.n.o.c.a.m.z, ...);
057 * </pre>
058 */
059public final class FindOptionSets {
060        /**
061         * The singleton instance.
062         */
063        public static final FindOptionSets INSTANCE = new FindOptionSets();
064        
065        /**
066         * Option {@code "-i"}: Use case insensitive matching when applying the file name pattern
067                        specified by the name operand
068<p>
069                        (This option is ignored if no name operand is specified).
070         * <p>
071         * The option {@code "-i"} is equivalent to the {@code "--}{@link #ignoreCase ignoreCase}{@code "} option.
072         */
073        public final FindOptionSet_acdfilmnorxz i = FindOptionSet_acdfilmnorxz.Active_i;  
074        /**
075         * Option {@code "--ignoreCase"}: Use case insensitive matching when applying the file name pattern
076                        specified by the name operand
077<p>
078                        (This option is ignored if no name operand is specified).
079         * <p>
080         * The option {@code "--ignoreCase"} is equivalent to the {@code "-}{@link #i i}{@code "} option.
081         */
082        public final FindOptionSet_acdfilmnorxz ignoreCase = FindOptionSet_acdfilmnorxz.Active_i_long;  
083        /**
084         * Option {@code "-z"}: Print the full file name on the standard output, followed by a null 
085                        character (instead of the newline character used by default). This
086                        allows file names that contain newlines or other types of white 
087                        space to be correctly interpreted by programs that process the find 
088                        output. This option corresponds to the --delimiter0 option of xargs.
089         * <p>
090         * The option {@code "-z"} is equivalent to the {@code "--}{@link #print0 print0}{@code "} option.
091         */
092        public final FindOptionSet_acdfilmnorxz z = FindOptionSet_acdfilmnorxz.Active_z;  
093        /**
094         * Option {@code "--print0"}: Print the full file name on the standard output, followed by a null 
095                        character (instead of the newline character used by default). This
096                        allows file names that contain newlines or other types of white 
097                        space to be correctly interpreted by programs that process the find 
098                        output. This option corresponds to the --delimiter0 option of xargs.
099         * <p>
100         * The option {@code "--print0"} is equivalent to the {@code "-}{@link #z z}{@code "} option.
101         */
102        public final FindOptionSet_acdfilmnorxz print0 = FindOptionSet_acdfilmnorxz.Active_z_long;  
103        /**
104         * Option {@code "-r"}: Use full regular expression syntax for the patterns specified by the
105                        name operand
106<p>
107                        (This option is ignored if no name operand is specified).
108         * <p>
109         * The option {@code "-r"} is equivalent to the {@code "--}{@link #regex regex}{@code "} option.
110         */
111        public final FindOptionSet_acdfilmnorxz r = FindOptionSet_acdfilmnorxz.Active_r;  
112        /**
113         * Option {@code "--regex"}: Use full regular expression syntax for the patterns specified by the
114                        name operand
115<p>
116                        (This option is ignored if no name operand is specified).
117         * <p>
118         * The option {@code "--regex"} is equivalent to the {@code "-}{@link #r r}{@code "} option.
119         */
120        public final FindOptionSet_acdfilmnorxz regex = FindOptionSet_acdfilmnorxz.Active_r_long;  
121        /**
122         * Option {@code "-a"}: The time operand refers to the last access time of the file
123                        <p>
124                        (This option is ignored if no time operand is specified).
125         * <p>
126         * The option {@code "-a"} is equivalent to the {@code "--}{@link #timeAccess timeAccess}{@code "} option.
127         */
128        public final FindOptionSet_adfilnorxz a = FindOptionSet_adfilnorxz.Active_a;  
129        /**
130         * Option {@code "--timeAccess"}: The time operand refers to the last access time of the file
131                        <p>
132                        (This option is ignored if no time operand is specified).
133         * <p>
134         * The option {@code "--timeAccess"} is equivalent to the {@code "-}{@link #a a}{@code "} option.
135         */
136        public final FindOptionSet_adfilnorxz timeAccess = FindOptionSet_adfilnorxz.Active_a_long;  
137        /**
138         * Option {@code "-c"}: The time operand refers to the creation time of the file
139                        <p>
140                        (This option is ignored if no time operand is specified).
141         * <p>
142         * The option {@code "-c"} is equivalent to the {@code "--}{@link #timeCreate timeCreate}{@code "} option.
143         */
144        public final FindOptionSet_cdfilnorxz c = FindOptionSet_cdfilnorxz.Active_c;  
145        /**
146         * Option {@code "--timeCreate"}: The time operand refers to the creation time of the file
147                        <p>
148                        (This option is ignored if no time operand is specified).
149         * <p>
150         * The option {@code "--timeCreate"} is equivalent to the {@code "-}{@link #c c}{@code "} option.
151         */
152        public final FindOptionSet_cdfilnorxz timeCreate = FindOptionSet_cdfilnorxz.Active_c_long;  
153        /**
154         * Option {@code "-m"}: The time operand refers to the last modification time of the file
155                        (the default)
156                        <p>
157                        (This option is ignored if no time operand is specified).
158         * <p>
159         * The option {@code "-m"} is equivalent to the {@code "--}{@link #timeModified timeModified}{@code "} option.
160         */
161        public final FindOptionSet_dfilmnorxz m = FindOptionSet_dfilmnorxz.Active_m;  
162        /**
163         * Option {@code "--timeModified"}: The time operand refers to the last modification time of the file
164                        (the default)
165                        <p>
166                        (This option is ignored if no time operand is specified).
167         * <p>
168         * The option {@code "--timeModified"} is equivalent to the {@code "-}{@link #m m}{@code "} option.
169         */
170        public final FindOptionSet_dfilmnorxz timeModified = FindOptionSet_dfilmnorxz.Active_m_long;  
171        /**
172         * Option {@code "-n"}: Consider only files that have been created, modified or accessed
173                        after or at the time specified by the time operand (the default)
174                        <p>
175                        (This option is ignored if no time operand is specified).
176         * <p>
177         * The option {@code "-n"} is equivalent to the {@code "--}{@link #timeNewer timeNewer}{@code "} option.
178         */
179        public final FindOptionSet_acdfilmnorxz n = FindOptionSet_acdfilmnorxz.Active_n;  
180        /**
181         * Option {@code "--timeNewer"}: Consider only files that have been created, modified or accessed
182                        after or at the time specified by the time operand (the default)
183                        <p>
184                        (This option is ignored if no time operand is specified).
185         * <p>
186         * The option {@code "--timeNewer"} is equivalent to the {@code "-}{@link #n n}{@code "} option.
187         */
188        public final FindOptionSet_acdfilmnorxz timeNewer = FindOptionSet_acdfilmnorxz.Active_n_long;  
189        /**
190         * Option {@code "-o"}: Consider only files that have been created, modified or accessed
191                        before or at the time specified by the time operand
192                        <p>
193                        (This option is ignored if no time operand is specified).
194         * <p>
195         * The option {@code "-o"} is equivalent to the {@code "--}{@link #timeOlder timeOlder}{@code "} option.
196         */
197        public final FindOptionSet_acdfilmnorxz o = FindOptionSet_acdfilmnorxz.Active_o;  
198        /**
199         * Option {@code "--timeOlder"}: Consider only files that have been created, modified or accessed
200                        before or at the time specified by the time operand
201                        <p>
202                        (This option is ignored if no time operand is specified).
203         * <p>
204         * The option {@code "--timeOlder"} is equivalent to the {@code "-}{@link #o o}{@code "} option.
205         */
206        public final FindOptionSet_acdfilmnorxz timeOlder = FindOptionSet_acdfilmnorxz.Active_o_long;  
207        /**
208         * Option {@code "-d"}: Consider only directories
209         * <p>
210         * The option {@code "-d"} is equivalent to the {@code "--}{@link #typeDirectory typeDirectory}{@code "} option.
211         */
212        public final FindOptionSet_acdimnorz d = FindOptionSet_acdimnorz.Active_d;  
213        /**
214         * Option {@code "--typeDirectory"}: Consider only directories
215         * <p>
216         * The option {@code "--typeDirectory"} is equivalent to the {@code "-}{@link #d d}{@code "} option.
217         */
218        public final FindOptionSet_acdimnorz typeDirectory = FindOptionSet_acdimnorz.Active_d_long;  
219        /**
220         * Option {@code "-f"}: Consider only regular files
221         * <p>
222         * The option {@code "-f"} is equivalent to the {@code "--}{@link #typeFile typeFile}{@code "} option.
223         */
224        public final FindOptionSet_acfimnorz f = FindOptionSet_acfimnorz.Active_f;  
225        /**
226         * Option {@code "--typeFile"}: Consider only regular files
227         * <p>
228         * The option {@code "--typeFile"} is equivalent to the {@code "-}{@link #f f}{@code "} option.
229         */
230        public final FindOptionSet_acfimnorz typeFile = FindOptionSet_acfimnorz.Active_f_long;  
231        /**
232         * Option {@code "-x"}: Consider only files that are neither of directory (d), 
233                        regular file (f) or symlink (l).
234         * <p>
235         * The option {@code "-x"} is equivalent to the {@code "--}{@link #typeOther typeOther}{@code "} option.
236         */
237        public final FindOptionSet_acimnorxz x = FindOptionSet_acimnorxz.Active_x;  
238        /**
239         * Option {@code "--typeOther"}: Consider only files that are neither of directory (d), 
240                        regular file (f) or symlink (l).
241         * <p>
242         * The option {@code "--typeOther"} is equivalent to the {@code "-}{@link #x x}{@code "} option.
243         */
244        public final FindOptionSet_acimnorxz typeOther = FindOptionSet_acimnorxz.Active_x_long;  
245        /**
246         * Option {@code "-l"}: Consider only symbolic links
247         * <p>
248         * The option {@code "-l"} is equivalent to the {@code "--}{@link #typeSymlink typeSymlink}{@code "} option.
249         */
250        public final FindOptionSet_acilmnorz l = FindOptionSet_acilmnorz.Active_l;  
251        /**
252         * Option {@code "--typeSymlink"}: Consider only symbolic links
253         * <p>
254         * The option {@code "--typeSymlink"} is equivalent to the {@code "-}{@link #l l}{@code "} option.
255         */
256        public final FindOptionSet_acilmnorz typeSymlink = FindOptionSet_acilmnorz.Active_l_long;  
257        
258}