Class JBossVfsUtil
vfs protocol.
The virtual file system is reached with reflection, as a dependency to WildFly or JBoss cannot be afforded, and a virtual file only exists on disk once its physical file has been asked for.
For internal use only. May be renamed or removed in a future release.
- Since:
- 25.3
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionmaterializeFiles(URL folder) Gets the entries directly inside the given folder, files and folders alike, creating them on disk.static FilematerializeFolder(URL folder) Gets the given folder as a folder on disk, creating it and everything inside it, so that the caller can read the folder as a whole.static FilematerializeJar(URL jar) Packs the given jar into a jar file on disk, as a jar of the virtual file system is not a file the caller can open on its own.
-
Field Details
-
PROTOCOL
The protocol WildFly and JBoss serve a deployed archive through.- See Also:
-
-
Method Details
-
materializeFiles
Gets the entries directly inside the given folder, files and folders alike, creating them on disk.What is inside the folders of the folder is not included.
- Parameters:
folder- thevfsURL of the folder- Returns:
- the entries of the folder, in the places they were created
- Throws:
IOException- if the folder cannot be read
-
materializeFolder
Gets the given folder as a folder on disk, creating it and everything inside it, so that the caller can read the folder as a whole.The caller only gets what the virtual file system created inside the folder. A mount that creates something of its own elsewhere, such as a jar inside the folder, is not part of the folder that is returned, which is not expected to happen and is warned about.
- Parameters:
folder- thevfsURL of the folder- Returns:
- the folder on disk
- Throws:
IOException- if the folder cannot be read
-
materializeJar
Packs the given jar into a jar file on disk, as a jar of the virtual file system is not a file the caller can open on its own.The jar is written into a temporary folder of its own, rather than into the temporary folder shared by everything on the machine, and both are deleted when the JVM exits.
- Parameters:
jar- thevfsURL of the jar- Returns:
- the jar file on disk
- Throws:
IOException- if the jar cannot be read or written
-