Package com.vaadin.flow.internal
Class ResourceFolderUtil
java.lang.Object
com.vaadin.flow.internal.ResourceFolderUtil
Lists the files in a folder on the classpath, wherever the folder lives.
A folder has no content of its own to read, so its files have to be listed, which depends on whether the folder is a folder on the file system, an entry in a jar or something an application server serves through a protocol of its own.
For internal use only. May be renamed or removed in a future release.
- Since:
- 25.3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA file inside a folder on the classpath.static interfaceCalled for each file in a folder. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvisitFiles(URL folder, ResourceFolderUtil.FolderFileVisitor visitor) Visits the files directly inside the given folder on the classpath.
-
Method Details
-
visitFiles
public static void visitFiles(URL folder, ResourceFolderUtil.FolderFileVisitor visitor) throws IOException Visits the files directly inside the given folder on the classpath.Folders inside the folder are not visited, and neither are the files in them.
- Parameters:
folder- the folder to visit the files of, as a class loader reports itvisitor- called for each file in the folder- Throws:
IOException- if the folder cannot be listed, for example because it is not an existing folder
-