Class PathUtils

java.lang.Object
org.jenkinsci.remoting.util.PathUtils

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class PathUtils extends Object
Utilities for Path handling.
  • Method Details

    • fileToPath

      @NonNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static Path fileToPath(@NonNull File file) throws IOException
      Converts File to Path and checks runtime exceptions.
      Parameters:
      file - File
      Returns:
      Resulting path
      Throws:
      IOException - Conversion error caused by InvalidPathException
      Since:
      3.14