if (monitor == null) return true; // index got deleted since acquired
try {
monitor.enterRead(); // ask permission to read
String containerRelativePath = Util.relativePath(this.folderPath, this.containerPath.segmentCount());
String[] paths = index.queryDocumentNames(containerRelativePath);
// all file names belonging to the folder or its subfolders and that are not excluded (see http://bugs.eclipse.org/bugs/show_bug.cgi?id=32607)
if (paths != null) {
if (this.exclusionPatterns == null && this.inclusionPatterns == null) {
for (int i = 0, max = paths.length; i < max; i++) {
manager.remove(paths[i], this.containerPath); // write lock will be acquired by the remove operation