Class PathUtil


  • public final class PathUtil
    extends Object
    Utility class providing file path operations.
    • Method Detail

      • makeAbsolutePath

        public static String makeAbsolutePath​(String path,
                                              FilePath relativeTo)
        Builds an absolute path by given relative path.
        Parameters:
        path - the path to make absolute
        relativeTo - the relative path
        Returns:
        the absolute path
      • copyRemoteFile

        public static boolean copyRemoteFile​(FilePath src,
                                             FilePath dest)
                                      throws IOException,
                                             InterruptedException
        Copies a file from source to destination which can be on remote.
        Parameters:
        src - the source file
        dest - the destination file
        Returns:
        true if successful, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion