@Override public boolean accept(File file) { return (!config.getAssetIgnoreHidden() || !file.isHidden()) && (file.isFile() || FileUtil.directoryOnlyIfNotIgnored(file)); } };
@Override public boolean accept(File pathname) { //Accept if input is a non-hidden file with registered extension //or if a non-hidden and not-ignored directory return !pathname.isHidden() && (pathname.isFile() && Engines.getRecognizedExtensions().contains(fileExt(pathname))) || (directoryOnlyIfNotIgnored(pathname)); } };
@Override public boolean accept(File pathname) { //Accept if input is a non-hidden file with NOT-registered extension //or if a non-hidden and not-ignored directory return !pathname.isHidden() && (pathname.isFile() //extension should not be from registered content extensions && !Engines.getRecognizedExtensions().contains(fileExt(pathname))) || (directoryOnlyIfNotIgnored(pathname)); } };
/** * Determine if a given file is an asset file. * @param path to the file to validate. * @return true if the path provided points to a file in the asset folder. */ public boolean isAssetFile(File path) { boolean isAsset = false; try { if(FileUtil.directoryOnlyIfNotIgnored(path.getParentFile())) { if (FileUtil.isFileInDirectory(path, config.getAssetFolder())) { isAsset = true; } else if (FileUtil.isFileInDirectory(path, config.getContentFolder()) && FileUtil.getNotContentFileFilter().accept(path)) { isAsset = true; } } } catch (IOException ioe) { LOGGER.error("Unable to determine the path to asset file {}", path.getPath(), ioe); } return isAsset; }
@Override public boolean accept(File file) { return (!config.getAssetIgnoreHidden() || !file.isHidden()) && (file.isFile() || FileUtil.directoryOnlyIfNotIgnored(file)); } };
@Override public boolean accept(File pathname) { //Accept if input is a non-hidden file with registered extension //or if a non-hidden and not-ignored directory return !pathname.isHidden() && (pathname.isFile() && Engines.getRecognizedExtensions().contains(fileExt(pathname))) || (directoryOnlyIfNotIgnored(pathname)); } };
@Override public boolean accept(File pathname) { //Accept if input is a non-hidden file with NOT-registered extension //or if a non-hidden and not-ignored directory return !pathname.isHidden() && (pathname.isFile() //extension should not be from registered content extensions && !Engines.getRecognizedExtensions().contains(fileExt(pathname))) || (directoryOnlyIfNotIgnored(pathname)); } };
/** * Determine if a given file is an asset file. * @param path to the file to validate. * @return true if the path provided points to a file in the asset folder. */ public boolean isAssetFile(File path) { boolean isAsset = false; try { if(FileUtil.directoryOnlyIfNotIgnored(path.getParentFile())) { if (FileUtil.isFileInDirectory(path, config.getAssetFolder())) { isAsset = true; } else if (FileUtil.isFileInDirectory(path, config.getContentFolder()) && FileUtil.getNotContentFileFilter().accept(path)) { isAsset = true; } } } catch (IOException ioe) { LOGGER.error("Unable to determine the path to asset file {}", path.getPath(), ioe); } return isAsset; }