Checks whether the folder has a default file of the type container page.<p>

@param folder the folder to check

@return <code>true</code> if the folder has a default file of the type container page
2200
private boolean hasContainerPageDefaultFile(CmsResource folder) {

        try {
            CmsResource defaultFile = A_CmsUI.getCmsObject().readDefaultFile(
                folder,
                CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
            return (defaultFile != null) && CmsResourceTypeXmlContainerPage.isContainerPage(defaultFile);
        } catch (CmsSecurityException e) {
            return false;
        }
    }
1120121
def has_default_file(cls):
        """"""
        for filename in cls.config_files:
            for searchpath in cls.config_searchpath:
                path = os.path.join(searchpath, filename)
                if os.path.exists(path):
                    return True

        return False
787285
public synchronized void configure(String folder) {
        Assert.notNull(folder, "'folder' must not be null");

        if (!staticResourcesSet) {

            if (staticResourceHandlers == null) {
                staticResourceHandlers = new ArrayList<>();
            }

            staticResourceHandlers.add(new ClassPathResourceHandler(folder, "index.html"));
            LOG.info("StaticResourceHandler configured with folder = " + folder);
            staticResourcesSet = true;
        }
    }
195368
function findPkgByFolder(folder, list) {
  var ret = null;

  if (list && list.length) {
    list.every(function(item) {
      if (item.folder === folder || path.resolve(baseUrl, item.folder) === folder) {
        ret = item;
        return false;
      }

      return true;
    });
  }

  return ret;
}
103699
public void removeFolder(String folder) {

        m_searchObject.removeFolder(folder);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }
681500
public void addSourceFolder(File folder) {
		Assert.notNull(folder, "Folder must not be null");
		Assert.isTrue(!folder.isFile(), "Folder '" + folder + "' must not be a file");
		synchronized (this.monitor) {
			checkNotStarted();
			this.folders.put(folder, null);
		}
	}
798094
public static boolean delFileOrFolder(File file) {
        if (file == null || !file.exists()) {
            // do nothing
        } else if (file.isFile()) {
            file.delete();
        } else if (file.isDirectory()) {
            File[] files = file.listFiles();
            if (files != null) {
                for (File sonFile : files) {
                    delFileOrFolder(sonFile);
                }
            }
            file.delete();
        }
        return true;
    }
59202
def is_app_folder(self, folder):
    
    with open('%s/%s/build.gradle' % (self.path, folder)) as f:
      for line in f.readlines():
        if config.gradle_plugin in line:
          return True
    return False
526064
private boolean isDefaultExcludes(File directory) {
        for (String pattern : DirectoryScanner.getDefaultExcludes()) {
            if (DirectoryScanner.match(pattern, directory.getAbsolutePath().replace("\\", "/"))) {
                return true;
            }
        }

        return false;
    }
339230
protected static void checkIsFolder(CmsResource resource) throws CmsException {

        if (!isFolder(resource)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(
                    org.opencms.file.Messages.ERR_REWRITE_LINKS_ROOT_NOT_FOLDER_1,
                    resource.getRootPath()));
        }
    }
950623
private boolean isCreateFolderMode() {

        CmsSitemapController controller = getHoverbar().getController();
        CmsSitemapData data = controller.getData();
        return data.isCreateNewFoldersForSubsitemaps()
            && (data.getSubsitemapFolderTypeInfos() != null)
            && !data.getSubsitemapFolderTypeInfos().isEmpty();
    }
1089200
public static String[] scanFolderAsArray(String folder) {
        List<String> list = scanFolder(folder);
        String[] arrays = new String[list.size()];
        int i = 0;
        for (String item : list) {
            arrays[i++] = item;
        }
        return arrays;
    }
29734
public void getSubFolders(final String folder, final AsyncCallback<List<CmsVfsEntryBean>> callback) {

        CmsRpcAction<List<CmsVfsEntryBean>> action = new CmsRpcAction<List<CmsVfsEntryBean>>() {

            @Override
            public void execute() {

                start(0, false);
                getGalleryService().getSubFolders(folder, this);
            }

            @Override
            protected void onResponse(List<CmsVfsEntryBean> result) {

                stop(false);
                callback.onSuccess(result);
            }

        };
        action.execute();
    }
1147459
public static boolean createFolder(File director) {
        return director.exists() || (createFolder(director.getParent()) && director.mkdir());
    }
112456
public List<String> list(String folder) throws IOException {
      List<String> res = new ArrayList<String>();
      if (path != null) {
        File f = new File(Utilities.path(path, folder));
        if (f.exists() && f.isDirectory())
          for (String s : f.list())
            res.add(s);
      } else {
        for (String s : content.keySet()) {
          if (s.startsWith(folder+"/") && !s.substring(folder.length()+2).contains("/"))
            res.add(s.substring(folder.length()+1));
        }
      }
      return res;
    }
635366
public static boolean isXmlContent(CmsResource resource) {

        boolean result = false;
        if (resource != null) {
            // avoid array index out of bound exception:
            if (!resource.isFolder()) {
                result = OpenCms.getResourceManager().getResourceType(resource) instanceof CmsResourceTypeXmlContent;
            }
        }
        return result;
    }
1338327
public static boolean isNavLevelFolder(CmsObject cms, CmsResource resource) {

        if (resource.isFolder()) {
            I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(resource);
            if (CmsResourceTypeFolder.RESOURCE_TYPE_NAME.equals(type.getTypeName())) {
                try {
                    CmsProperty prop = cms.readPropertyObject(
                        resource,
                        CmsPropertyDefinition.PROPERTY_DEFAULT_FILE,
                        false);
                    return !prop.isNullProperty() && NAVIGATION_LEVEL_FOLDER.equals(prop.getValue());
                } catch (CmsException e) {
                    LOG.debug(e.getMessage(), e);
                }
            }
        }
        return false;
    }