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 TypeMethodDescriptiongetFileExtension
(Path path) static String
static void
makeExecutable
(Path file) static InputStream
newBufferedInputStream
(Path path, OpenOption... options) static OutputStream
newBufferedOutputStream
(Path path, OpenOption... options) static Path
static FileSystem
openZipAsFileSystem
(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
-