Package org.apache.tools.ant.util

## Class WindowsJunctionUtils

- java.lang.Object
- - org.apache.tools.ant.util.WindowsJunctionUtils

    public class WindowsJunctionUtils
    extends java.lang.Object

Contains methods related to Windows NTFS junctions.

Since:
  Ant 1.10.16

### Constructor Summary

Constructors
`protected` `WindowsJunctionUtils()` Empty constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static WindowsJunctionUtils` `getWindowsJunctionUtils()` Method to retrieve The WindowsJunctionUtils, which is shared by all users of this method.
`boolean` `isJunction​(java.io.File file)` Checks whether a given file is a windows junction.
`boolean` `isJunction​(java.nio.file.Path path)` Checks whether a given path is a windows junction.
`boolean` `isJunctionSafe​(java.io.File file)` Checks whether a given file is a windows junction.
`boolean` `isJunctionSafe​(java.nio.file.Path path)` Checks whether a given path is a windows junction.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### WindowsJunctionUtils

    protected WindowsJunctionUtils()

Empty constructor.

### Method Detail

#### getWindowsJunctionUtils

    public static WindowsJunctionUtils getWindowsJunctionUtils()

Method to retrieve The WindowsJunctionUtils, which is shared by all users of this method.

Returns:
  an instance of WindowsJunctionUtils.

#### isJunction

    public boolean isJunction​(java.io.File file)
                       throws java.io.IOException

Checks whether a given file is a windows junction.

Returns:
  true if the file is a windows junction.
Throws:
  `java.io.IOException` - on error.

#### isJunctionSafe

    public boolean isJunctionSafe​(java.io.File file)

Checks whether a given file is a windows junction.

Returns:
  false if the given file is not a windows junction or an exception occured while trying to check the file - most likely because the file didn't exists.

#### isJunctionSafe

    public boolean isJunctionSafe​(java.nio.file.Path path)

Checks whether a given path is a windows junction.

Returns:
  false if the given path is not a junction or an exception occured while trying to check the path - most likely because the path didn't exists.

#### isJunction

    public boolean isJunction​(java.nio.file.Path path)
                       throws java.io.IOException

Checks whether a given path is a windows junction.

Returns:
  true if the path is a windows junction.
Throws:
  `java.io.IOException` - on error.