Package io.quarkus.deployment.util
Class FileUtil
java.lang.Object
io.quarkus.deployment.util.FileUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deleteDirectory
(Path directory) static void
deleteIfExists
(Path path) static byte[]
readFileContents
(InputStream inputStream) static String
translateToVolumePath
(String windowsStylePath) Translates a file path from the Windows Style to a syntax accepted by Docker and Podman, so that volumes be safely mounted in both Docker Desktop for Windows and Podman Windows.
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
deleteIfExists
- Throws:
IOException
-
deleteDirectory
- Throws:
IOException
-
readFileContents
- Throws:
IOException
-
translateToVolumePath
Translates a file path from the Windows Style to a syntax accepted by Docker and Podman, so that volumes be safely mounted in both Docker Desktop for Windows and Podman Windows.docker run -v /c/foo/bar:/somewhere (...)
You should only use this method on Windows-style paths, and not Unix-style paths.
- Parameters:
windowsStylePath
- A path formatted in Windows-style, e.g. "C:\foo\bar".- Returns:
- A translated path accepted by Docker, e.g. "/c/foo/bar".
-