public class ResourceUtils extends Object
|Modifier and Type||Method and Description|
List all classpath resource files, optionally recursively, inside the specified path/directory The path argument should be a directory.
public static List<String> listClassPathFiles(String path, boolean recursive, boolean includeDirectories, String... extensions)
path- Path in which to list all files
recursive- If true: list all files in subdirectories also. If false: only include files in the specified directory, but not any files in subdirectories
includeDirectories- If true: include any subdirectories in the returned list of files. False: Only return files, not directories
extensions- Optional - may be null (or length 0). If null/length 0: files with any extension are returned If non-null: only files matching one of the specified extensions are included. Extensions can we specified with or without "." - i.e., "csv" and ".csv" are the same
Copyright © 2020. All rights reserved.