File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/main/java/org/apache/commons/net/ftp Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2270,6 +2270,22 @@ public FTPFile[] listFiles()
2270
2270
return listFiles ((String ) null );
2271
2271
}
2272
2272
2273
+ /**
2274
+ * Version of {@link #listFiles(String)} which allows a filter to be provided.
2275
+ * For example: <code>listFiles("site", FTPFileFilters.DIRECTORY);</code>
2276
+ * @param pathname the initial path, may be null
2277
+ * @param filter the filter, non-null
2278
+ * @return the list of FTPFile entries.
2279
+ * @throws IOException
2280
+ */
2281
+ public FTPFile [] listFiles (String pathname , FTPFileFilter filter )
2282
+ throws IOException
2283
+ {
2284
+ FTPListParseEngine engine = initiateListParsing ((String ) null , pathname );
2285
+ return engine .getFiles (filter );
2286
+
2287
+ }
2288
+
2273
2289
/**
2274
2290
* Using the default autodetect mechanism, initialize an FTPListParseEngine
2275
2291
* object containing a raw file information for the current working
You can’t perform that action at this time.
0 commit comments