Package org.apache.hadoop.fs.shell.find
Class FindOptions
java.lang.Object
org.apache.hadoop.fs.shell.find.FindOptions
Options to be used by the
Find command and its Expressions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the command factory.Return theConfigurationreturn configurationConfigurationgetErr()Returns the error stream to be used.getIn()Returns the input stream to be used.intReturns the maximum depth for applying expressions.intReturns the minimum depth for applying expressions.getOut()Returns the output stream to be used.longReturns the start time of thisFindcommand.booleanShould directory tree be traversed depth first?booleanShould command line symbolic links be follows?booleanShould symbolic links be follows?voidsetCommandFactory(CommandFactory factory) Set the command factory.voidsetConfiguration(Configuration configuration) Set theConfigurationvoidsetDepthFirst(boolean depthFirst) Sets flag indicating whether the expression should be applied to the directory tree depth first.voidsetErr(PrintStream err) Sets the error stream to be used.voidsetFollowArgLink(boolean followArgLink) Sets flag indicating whether command line symbolic links should be followed.voidsetFollowLink(boolean followLink) Sets flag indicating whether symbolic links should be followed.voidsetIn(InputStream in) Sets the input stream to be used.voidsetMaxDepth(int maxDepth) Sets the maximum depth for applying expressions.voidsetMinDepth(int minDepth) Sets the minimum depth for applying expressions.voidsetOut(PrintStream out) Sets the output stream to be used.voidsetStartTime(long time) Set the start time of thisFindcommand.
-
Constructor Details
-
FindOptions
public FindOptions()
-
-
Method Details
-
setOut
Sets the output stream to be used.- Parameters:
out- output stream to be used
-
getOut
Returns the output stream to be used.- Returns:
- output stream to be used
-
setErr
Sets the error stream to be used.- Parameters:
err- error stream to be used
-
getErr
Returns the error stream to be used.- Returns:
- error stream to be used
-
setIn
Sets the input stream to be used.- Parameters:
in- input stream to be used
-
getIn
Returns the input stream to be used.- Returns:
- input stream to be used
-
setDepthFirst
public void setDepthFirst(boolean depthFirst) Sets flag indicating whether the expression should be applied to the directory tree depth first.- Parameters:
depthFirst- true indicates depth first traversal
-
isDepthFirst
public boolean isDepthFirst()Should directory tree be traversed depth first?- Returns:
- true indicate depth first traversal
-
setFollowLink
public void setFollowLink(boolean followLink) Sets flag indicating whether symbolic links should be followed.- Parameters:
followLink- true indicates follow links
-
isFollowLink
public boolean isFollowLink()Should symbolic links be follows?- Returns:
- true indicates links should be followed
-
setFollowArgLink
public void setFollowArgLink(boolean followArgLink) Sets flag indicating whether command line symbolic links should be followed.- Parameters:
followArgLink- true indicates follow links
-
isFollowArgLink
public boolean isFollowArgLink()Should command line symbolic links be follows?- Returns:
- true indicates links should be followed
-
getStartTime
public long getStartTime()Returns the start time of thisFindcommand.- Returns:
- start time (in milliseconds since epoch)
-
setStartTime
public void setStartTime(long time) Set the start time of thisFindcommand.- Parameters:
time- start time (in milliseconds since epoch)
-
getMinDepth
public int getMinDepth()Returns the minimum depth for applying expressions.- Returns:
- min depth
-
setMinDepth
public void setMinDepth(int minDepth) Sets the minimum depth for applying expressions.- Parameters:
minDepth- minimum depth
-
getMaxDepth
public int getMaxDepth()Returns the maximum depth for applying expressions.- Returns:
- maximum depth
-
setMaxDepth
public void setMaxDepth(int maxDepth) Sets the maximum depth for applying expressions.- Parameters:
maxDepth- maximum depth
-
setCommandFactory
Set the command factory.- Parameters:
factory-CommandFactory
-
getCommandFactory
Return the command factory.- Returns:
CommandFactory
-
setConfiguration
Set theConfiguration- Parameters:
configuration-Configuration
-
getConfiguration
Return theConfigurationreturn configurationConfiguration- Returns:
- configuration.
-