Class WindowsJunctionUtils

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

public class WindowsJunctionUtils extends Object
Contains methods related to Windows NTFS junctions.
Since:
Ant 1.10.16
  • Constructor Details

    • WindowsJunctionUtils

      protected WindowsJunctionUtils()
      Empty constructor.
  • Method Details

    • 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(File file) throws IOException
      Checks whether a given file is a windows junction.
      Returns:
      true if the file is a windows junction.
      Throws:
      IOException - on error.
    • isJunctionSafe

      public boolean isJunctionSafe(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(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(Path path) throws IOException
      Checks whether a given path is a windows junction.
      Returns:
      true if the path is a windows junction.
      Throws:
      IOException - on error.