mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 16:15:54 +00:00
Removing VirtualFile.asRemotable in favor of toExternalURL.
This commit is contained in:
2 files changed
+26
-25
No files matched your search
@@ -139,6 +139,7 @@ import static hudson.Util.isSymlink;
|
||||
|
||||
import java.util.Collections;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.kohsuke.accmod.restrictions.Beta;
|
||||
|
||||
/**
|
||||
* {@link File} like object with remoting support.
|
||||
@@ -903,6 +904,28 @@ public final class FilePath implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the content of a URL to a remote file.
|
||||
* Unlike {@link #copyFrom} this will not transfer content over a Remoting channel.
|
||||
* @since FIXME
|
||||
*/
|
||||
@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}.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user