Class FileUtils
java.lang.Object
io.github.ascopes.protobufmavenplugin.fs.FileUtils
Common helper logic for file handling operations.
- Author:
- Ashley Scopes
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteTree(Path path) getFileExtension(Path path) static Stringstatic voidmakeExecutable(Path file) static InputStreamnewBufferedInputStream(Path path, OpenOption... options) static OutputStreamnewBufferedOutputStream(Path path, OpenOption... options) static Pathstatic FileSystemopenZipAsFileSystem(Path zipPath) rebaseFileTree(Path existingRoot, Path newRoot, Stream<Path> paths)
-
Method Details
-
normalize
-
getFileNameWithoutExtension
-
getFileExtension
-
openZipAsFileSystem
- Throws:
IOException
-
makeExecutable
- Throws:
IOException
-
rebaseFileTree
public static List<Path> rebaseFileTree(Path existingRoot, Path newRoot, Stream<Path> paths) throws IOException - Throws:
IOException
-
newBufferedInputStream
public static InputStream newBufferedInputStream(Path path, OpenOption... options) throws IOException - Throws:
IOException
-
newBufferedOutputStream
public static OutputStream newBufferedOutputStream(Path path, OpenOption... options) throws IOException - Throws:
IOException
-
deleteTree
- Throws:
IOException
-