blob: a3273eb8b3d5a52ca2c8b4994631d0043fde75b7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_66) on Fri Jan 15 14:33:43 CET 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DirectoryScanner (Apache Mina SSHD :: Core 1.1.0 API)</title>
<meta name="date" content="2016-01-15">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DirectoryScanner (Apache Mina SSHD :: Core 1.1.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DirectoryScanner.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/sshd/common/util/io/DERWriter.html" title="class in org.apache.sshd.common.util.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/sshd/common/util/io/EmptyInputStream.html" title="class in org.apache.sshd.common.util.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/sshd/common/util/io/DirectoryScanner.html" target="_top">Frames</a></li>
<li><a href="DirectoryScanner.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.sshd.common.util.io</div>
<h2 title="Class DirectoryScanner" class="title">Class DirectoryScanner</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.sshd.common.util.io.DirectoryScanner</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">DirectoryScanner</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><p>Class for scanning a directory for files/directories which match certain
criteria.</p>
<p>These criteria consist of selectors and patterns which have been specified.
With the selectors you can select which files you want to have included.
Files which are not selected are excluded. With patterns you can include
or exclude files based on their filename.</p>
<p>The idea is simple. A given directory is recursively scanned for all files
and directories. Each file/directory is matched against a set of selectors,
including special support for matching against filenames with include and
and exclude patterns. Only files/directories which match at least one
pattern of the include pattern list or other file selector, and don't match
any pattern of the exclude pattern list or fail to match against a required
selector will be placed in the list of files/directories found.</p>
<p>When no list of include patterns is supplied, "**" will be used, which
means that everything will be matched. When no list of exclude patterns is
supplied, an empty list is used, such that nothing will be excluded. When
no selectors are supplied, none are applied.</p>
<p>The filename pattern matching is done as follows:
The name to be matched is split up in path segments. A path segment is the
name of a directory or file, which is bounded by
<code>File.separator</code> ('/' under UNIX, '\' under Windows).
For example, "abc/def/ghi/xyz.java" is split up in the segments "abc",
"def","ghi" and "xyz.java".
The same is done for the pattern against which should be matched.</p>
<p>The segments of the name and the pattern are then matched against each
other. When '**' is used for a path segment in the pattern, it matches
zero or more path segments of the name.</p>
<p>There is a special case regarding the use of <code>File.separator</code>s
at the beginning of the pattern and the string to match:<br>
When a pattern starts with a <code>File.separator</code>, the string
to match must also start with a <code>File.separator</code>.
When a pattern does not start with a <code>File.separator</code>, the
string to match may not start with a <code>File.separator</code>.
When one of these rules is not obeyed, the string will not
match.</p>
<p>When a name path segment is matched against a pattern path segment, the
following special characters can be used:<br>
'*' matches zero or more characters<br>
'?' matches one character.</p>
<p>Examples:
<br>
<code>"**\*.class"</code> matches all <code>.class</code> files/dirs in a directory tree.
<br>
<code>"test\a??.java"</code> matches all files/dirs which start with an 'a', then two
more characters and then <code>".java"</code>, in a directory called test.
<br>
<code>"**"</code> matches everything in a directory tree.
<br>
<code>"**\test\**\XYZ*"</code> matches all files/dirs which start with <code>"XYZ"</code> and where
there is a parent directory called test (e.g. <code>"abc\test\def\ghi\XYZ123"</code>).
</p>
<p>Case sensitivity may be turned off if necessary. By default, it is
turned on.</p>
<p>Example of usage:</p>
<pre>
String[] includes = {"*\*\*.class"};
String[] excludes = {"modules\\\*\**"};
ds.setIncludes(includes);
ds.setExcludes(excludes);
ds.setBasedir(new File("test"));
ds.setCaseSensitive(true);
ds.scan();
System.out.println("FILES:");
String[] files = ds.getIncludedFiles();
for (int i = 0; i &lt; files.length; i++) {
System.out.println(files[i]);
}
</pre>
<p>This will scan a directory called test for .class files, but excludes all
files in all proper subdirectories of a directory called "modules".</p></div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Arnout J. Kuiper
<a href="mailto:ajkuiper@wxs.nl">ajkuiper@wxs.nl</a>, Magesh Umasankar, <a href="mailto:bruce@callenish.com">Bruce Atherton</a>, <a href="mailto:levylambert@tiscali-dsl.de">Antoine Levy-Lambert</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#basedir">basedir</a></span></code>
<div class="block">The base directory to be scanned.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#filesIncluded">filesIncluded</a></span></code>
<div class="block">The files which matched at least one include and no excludes
and were selected.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#includes">includes</a></span></code>
<div class="block">The patterns for the files to be included.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#isCaseSensitive">isCaseSensitive</a></span></code>
<div class="block">Whether or not the file system should be treated as a case sensitive
one.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#DirectoryScanner--">DirectoryScanner</a></span>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#DirectoryScanner-java.lang.String-java.lang.String...-">DirectoryScanner</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;basedir,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;includes)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#couldHoldIncluded-java.lang.String-">couldHoldIncluded</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Tests whether or not a name matches the start of at least one include
pattern.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#getBasedir--">getBasedir</a></span>()</code>
<div class="block">Returns the base directory to be scanned.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#getIncludedFiles--">getIncludedFiles</a></span>()</code>
<div class="block">Returns the names of the files which matched at least one of the
include patterns and none of the exclude patterns.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#isIncluded-java.lang.String-">isIncluded</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Tests whether or not a name matches against at least one include
pattern.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#replace-java.lang.String-java.lang.String-java.lang.String-int-">replace</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;repl,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;with,
int&nbsp;max)</code>
<div class="block">Replace a String with another String inside a larger String,
for the first <code>max</code> values of the search String.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#scan--">scan</a></span>()</code>
<div class="block">Scans the base directory for files which match at least one include
pattern and don't match any exclude patterns.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#scandir-java.io.File-java.lang.String-">scandir</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dir,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;vpath)</code>
<div class="block">Scans the given directory for files and directories.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#setBasedir-java.io.File-">setBasedir</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;basedir)</code>
<div class="block">Sets the base directory to be scanned.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#setBasedir-java.lang.String-">setBasedir</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;basedir)</code>
<div class="block">Sets the base directory to be scanned.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/io/DirectoryScanner.html#setIncludes-java.lang.String:A-">setIncludes</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;includes)</code>
<div class="block">Sets the list of include patterns to use.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="basedir">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>basedir</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> basedir</pre>
<div class="block">The base directory to be scanned.</div>
</li>
</ul>
<a name="includes">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>includes</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] includes</pre>
<div class="block">The patterns for the files to be included.</div>
</li>
</ul>
<a name="filesIncluded">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>filesIncluded</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt; filesIncluded</pre>
<div class="block">The files which matched at least one include and no excludes
and were selected.</div>
</li>
</ul>
<a name="isCaseSensitive">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isCaseSensitive</h4>
<pre>protected&nbsp;boolean isCaseSensitive</pre>
<div class="block">Whether or not the file system should be treated as a case sensitive
one.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DirectoryScanner--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DirectoryScanner</h4>
<pre>public&nbsp;DirectoryScanner()</pre>
</li>
</ul>
<a name="DirectoryScanner-java.lang.String-java.lang.String...-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DirectoryScanner</h4>
<pre>public&nbsp;DirectoryScanner(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;basedir,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;includes)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setBasedir-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBasedir</h4>
<pre>public&nbsp;void&nbsp;setBasedir(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;basedir)</pre>
<div class="block">Sets the base directory to be scanned. This is the directory which is
scanned recursively. All '/' and '\' characters are replaced by
<code>File.separatorChar</code>, so the separator used need not match
<code>File.separatorChar</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>basedir</code> - The base directory to scan.
Must not be <code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="setBasedir-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBasedir</h4>
<pre>public&nbsp;void&nbsp;setBasedir(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;basedir)</pre>
<div class="block">Sets the base directory to be scanned. This is the directory which is
scanned recursively.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>basedir</code> - The base directory for scanning.
Should not be <code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="getBasedir--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBasedir</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getBasedir()</pre>
<div class="block">Returns the base directory to be scanned.
This is the directory which is scanned recursively.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the base directory to be scanned</dd>
</dl>
</li>
</ul>
<a name="setIncludes-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIncludes</h4>
<pre>public&nbsp;void&nbsp;setIncludes(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;includes)</pre>
<div class="block"><p>Sets the list of include patterns to use. All '/' and '\' characters
are replaced by <code>File.separatorChar</code>, so the separator used
need not match <code>File.separatorChar</code>.</p>
<p>When a pattern ends with a '/' or '\', "**" is appended.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>includes</code> - A list of include patterns.
May be <code>null</code>, indicating that all files
should be included. If a non-<code>null</code>
list is given, all elements must be
non-<code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="scan--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scan</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;scan()
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Scans the base directory for files which match at least one include
pattern and don't match any exclude patterns. If there are selectors
then the files must pass muster there, as well.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the matching files</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the base directory was set
incorrectly (i.e. if it is <code>null</code>, doesn't exist,
or isn't a directory).</dd>
</dl>
</li>
</ul>
<a name="scandir-java.io.File-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scandir</h4>
<pre>protected&nbsp;void&nbsp;scandir(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;dir,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;vpath)</pre>
<div class="block">Scans the given directory for files and directories. Found files and
directories are placed in their respective collections, based on the
matching of includes, excludes, and the selectors. When a directory
is found, it is scanned recursively.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dir</code> - The directory to scan. Must not be <code>null</code>.</dd>
<dd><code>vpath</code> - The path relative to the base directory (needed to
prevent problems with an absolute path when using
dir). Must not be <code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="getIncludedFiles--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIncludedFiles</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;getIncludedFiles()</pre>
<div class="block">Returns the names of the files which matched at least one of the
include patterns and none of the exclude patterns.
The names are relative to the base directory.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the names of the files which matched at least one of the
include patterns and none of the exclude patterns.</dd>
</dl>
</li>
</ul>
<a name="isIncluded-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isIncluded</h4>
<pre>protected&nbsp;boolean&nbsp;isIncluded(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Tests whether or not a name matches against at least one include
pattern.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name to match. Must not be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> when the name matches against at least one
include pattern, or <code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a name="couldHoldIncluded-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>couldHoldIncluded</h4>
<pre>protected&nbsp;boolean&nbsp;couldHoldIncluded(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Tests whether or not a name matches the start of at least one include
pattern.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name to match. Must not be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> when the name matches against the start of at
least one include pattern, or <code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a name="replace-java.lang.String-java.lang.String-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>replace</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;replace(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;repl,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;with,
int&nbsp;max)</pre>
<div class="block"><p>Replace a String with another String inside a larger String,
for the first <code>max</code> values of the search String.</p>
<p>A <code>null</code> reference passed to this method is a no-op.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>text</code> - text to search and replace in</dd>
<dd><code>repl</code> - String to search for</dd>
<dd><code>with</code> - String to replace with</dd>
<dd><code>max</code> - maximum number of values to replace, or <code>-1</code> if no maximum</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the text with any replacements processed</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DirectoryScanner.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/sshd/common/util/io/DERWriter.html" title="class in org.apache.sshd.common.util.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/sshd/common/util/io/EmptyInputStream.html" title="class in org.apache.sshd.common.util.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/sshd/common/util/io/DirectoryScanner.html" target="_top">Frames</a></li>
<li><a href="DirectoryScanner.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>