Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions core/src/main/java/hudson/FilePath.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@

import java.util.Collections;
import org.apache.tools.ant.BuildException;
import org.kohsuke.accmod.restrictions.Beta;

/**
* {@link File} like object with remoting support.
Expand Down Expand Up @@ -972,28 +971,6 @@ public void copyFrom(URL url) throws IOException, InterruptedException {
}
}

/**
* Copies the content of a URL to a remote file.
* Unlike {@link #copyFrom} this will not transfer content over a Remoting channel.
* @since 2.118
*/
@Restricted(Beta.class)
public void copyFromRemotely(URL url) throws IOException, InterruptedException {
act(new CopyFromRemotely(url));
}
private final class CopyFromRemotely extends MasterToSlaveFileCallable<Void> {
private static final long serialVersionUID = 1;
private final URL url;
CopyFromRemotely(URL url) {
this.url = url;
}
@Override
public Void invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
copyFrom(url);
return null;
}
}

/**
* Replaces the content of this file by the data from the given {@link InputStream}.
*
Expand Down
3 changes: 3 additions & 0 deletions core/src/main/java/jenkins/util/VirtualFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ public <V> V run(Callable<V,IOException> callable) throws IOException {
/**
* Optionally obtains a URL which may be used to retrieve file contents from any process on any node.
* For example, given cloud storage this might produce a permalink to the file.
* <p>Only {@code http} and {@code https} protocols are permitted.
* It is recommended to use the {@code RobustHTTPClient.downloadFile} utility method
* from the {@code apache-httpcomponents-client-4-api} plugin to work with these URLs.
* <p>This is only meaningful for {@link #isFile}:
* no ZIP etc. archiving protocol is defined to allow bulk access to directory trees.
* <p>Any necessary authentication must be encoded somehow into the URL itself;
Expand Down