Package hudson.util.jna
Class Kernel32Utils
java.lang.Object
hudson.util.jna.Kernel32Utils
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createSymbolicLink
(File symlink, String target, boolean dirLink) Deprecated.static File
static int
getWin32FileAttributes
(File file) Deprecated.UseFiles.readAttributes(java.nio.file.Path, java.lang.Class<A>, java.nio.file.LinkOption...)
withDosFileAttributes
and reflective calls to WindowsFileAttributes if necessary.static boolean
isJunctionOrSymlink
(File file) Deprecated.UseUtil.isSymlink(java.io.File)
to detect symbolic links and junctions instead.static int
waitForExitProcess
(com.sun.jna.Pointer hProcess) Given the process handle, waits for its completion and returns the exit code.
-
Constructor Details
-
Kernel32Utils
public Kernel32Utils()
-
-
Method Details
-
waitForExitProcess
Given the process handle, waits for its completion and returns the exit code.- Throws:
InterruptedException
-
getWin32FileAttributes
Deprecated.UseFiles.readAttributes(java.nio.file.Path, java.lang.Class<A>, java.nio.file.LinkOption...)
withDosFileAttributes
and reflective calls to WindowsFileAttributes if necessary.- Throws:
IOException
-
createSymbolicLink
@Deprecated public static void createSymbolicLink(File symlink, String target, boolean dirLink) throws IOException Deprecated.- Parameters:
target
- If relative, resolved against the location of the symlink. If absolute, it's absolute.- Throws:
UnsatisfiedLinkError
- If the function is not exported by kernel32. See CreateSymbolicLinkA function (winbase.h) for compatibility info.IOException
-
isJunctionOrSymlink
Deprecated.UseUtil.isSymlink(java.io.File)
to detect symbolic links and junctions instead.- Throws:
IOException
-
getTempDir
-
Util.createSymlink(java.io.File, java.lang.String, java.lang.String, hudson.model.TaskListener)
instead.