org.dellroad.stuff.io
Class HardLink

java.lang.Object
  extended by org.dellroad.stuff.io.HardLink

public final class HardLink
extends Object

Supports hard-linking of files on UNIX systems.

This class requires the JNA library.


Method Summary
static void link(File src, File dest)
          Create a hard link from src to dest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

link

public static void link(File src,
                        File dest)
                 throws IOException
Create a hard link from src to dest.

Parameters:
src - existing file to be linked to dest
dest - new file that will link to src
Throws:
IOException - if the operation fails