Package hudson.util.jna
Class Kernel32Utils
- java.lang.Object
-
- hudson.util.jna.Kernel32Utils
-
public class Kernel32Utils extends Object
- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description Kernel32Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
createSymbolicLink(File symlink, String target, boolean dirLink)
Deprecated.static File
getTempDir()
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.
-
-
-
Method Detail
-
waitForExitProcess
public static int waitForExitProcess(com.sun.jna.Pointer hProcess) throws InterruptedException
Given the process handle, waits for its completion and returns the exit code.- Throws:
InterruptedException
-
getWin32FileAttributes
@Deprecated public static int getWin32FileAttributes(File file) throws IOException
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 public static boolean isJunctionOrSymlink(File file) throws IOException
Deprecated.UseUtil.isSymlink(java.io.File)
to detect symbolic links and junctions instead.- Throws:
IOException
-
getTempDir
public static File getTempDir()
-
-