making the method more discoverable by having an instance method

This commit is contained in:
Kohsuke Kawaguchi committed 2013-09-13 12:00:22 -07:00
1 parent f7900f2759
commit d3a13f46e6
3 files changed
+11 -3

No files matched your search

+8
View File
@@ -53,6 +53,7 @@ import static hudson.FilePath.TarCompression.GZIP;
import hudson.org.apache.tools.tar.TarInputStream;
import hudson.util.io.Archiver;
import hudson.util.io.ArchiverFactory;
import jenkins.util.VirtualFile;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.FileSet;
@@ -1041,6 +1042,13 @@ public final class FilePath implements Serializable {
});
}
/**
* Gets the {@link VirtualFile} representation of this {@link FilePath}
*/
public VirtualFile toVirtualFile() {
return VirtualFile.forFilePath(this);
}
/**
* Creates this directory.
*/