FileUtil.HardLinkpublic class HardLink
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
HardLink.LinkStats |
HardLink statistics counters and methods.
|
| Modifier and Type | Field | Description |
|---|---|---|
HardLink.LinkStats |
linkStats |
| Constructor | Description |
|---|---|
HardLink() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
createHardLink(java.io.File file,
java.io.File linkName) |
Creates a hardlink.
|
static void |
createHardLinkMult(java.io.File parentDir,
java.lang.String[] fileBaseNames,
java.io.File linkDir) |
Creates hardlinks from multiple existing files within one parent
directory, into one target directory.
|
static int |
getLinkCount(java.io.File fileName) |
Retrieves the number of links to the specified file.
|
public final HardLink.LinkStats linkStats
public static void createHardLink(java.io.File file,
java.io.File linkName)
throws java.io.IOException
file - - existing source filelinkName - - desired target link filejava.io.IOException - raised on errors performing I/O.public static void createHardLinkMult(java.io.File parentDir,
java.lang.String[] fileBaseNames,
java.io.File linkDir)
throws java.io.IOException
parentDir - - directory containing source filesfileBaseNames - - list of path-less file names, as returned by
parentDir.list()linkDir - - where the hardlinks should be put. It must already exist.java.io.IOException - raised on errors performing I/O.public static int getLinkCount(java.io.File fileName)
throws java.io.IOException
fileName - file name.java.io.IOException - raised on errors performing I/O.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.