Class PatchUtils
java.lang.Object
org.netbeans.api.diff.PatchUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyPatch
(File patch, File context) Applies the patch file on the context file or folder.static boolean
Returns true only if the given file is a patch in a format recognizable as a context normal unified
-
Method Details
-
applyPatch
Applies the patch file on the context file or folder. The patch file may be in a context, normal or unified format.- Parameters:
patch
- the patch filecontext
- the file or folder to be updated with the patch- Throws:
org.netbeans.modules.diff.builtin.PatchException
IOException
- - the patch is invalid or cannot be applied- Since:
- 1.19
-
isPatch
Returns true only if the given file is a patch in a format recognizable as a- context
- normal
- unified
- Parameters:
patch
- patch file- Returns:
- true if the given input stream is a patch otherwise false
- Throws:
IOException
- Since:
- 1.19
-