blob: 0bd8605fc707aef27b2aa21bee2bc138da7431e6 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161-google-v7) on Thu Oct 18 16:14:35 PDT 2018 -->
<title>FileSystems (Apache Beam 2.8.0-SNAPSHOT)</title>
<meta name="date" content="2018-10-18">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FileSystems (Apache Beam 2.8.0-SNAPSHOT)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/beam/sdk/io/FileSystemRegistrar.html" title="interface in org.apache.beam.sdk.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/io/GenerateSequence.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/io/FileSystems.html" target="_top">Frames</a></li>
<li><a href="FileSystems.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.beam.sdk.io</div>
<h2 title="Class FileSystems" class="title">Class FileSystems</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.beam.sdk.io.FileSystems</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre><a href="../../../../../org/apache/beam/sdk/annotations/Experimental.html" title="annotation in org.apache.beam.sdk.annotations">@Experimental</a>(<a href="../../../../../org/apache/beam/sdk/annotations/Experimental.html#value--">value</a>=<a href="../../../../../org/apache/beam/sdk/annotations/Experimental.Kind.html#FILESYSTEM">FILESYSTEM</a>)
public class <span class="typeNameLabel">FileSystems</span>
extends java.lang.Object</pre>
<div class="block">Clients facing <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystem</code></a> utility.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#DEFAULT_SCHEME">DEFAULT_SCHEME</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#FileSystems--">FileSystems</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#copy-java.util.List-java.util.List-org.apache.beam.sdk.io.fs.MoveOptions...-">copy</a></span>(java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;srcResourceIds,
java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;destResourceIds,
<a href="../../../../../org/apache/beam/sdk/io/fs/MoveOptions.html" title="interface in org.apache.beam.sdk.io.fs">MoveOptions</a>...&nbsp;moveOptions)</code>
<div class="block">Copies a <code>List</code> of file-like resources from one location to another.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static java.nio.channels.WritableByteChannel</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#create-org.apache.beam.sdk.io.fs.ResourceId-org.apache.beam.sdk.io.fs.CreateOptions-">create</a></span>(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&nbsp;resourceId,
<a href="../../../../../org/apache/beam/sdk/io/fs/CreateOptions.html" title="class in org.apache.beam.sdk.io.fs">CreateOptions</a>&nbsp;createOptions)</code>
<div class="block">Returns a write channel for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a> with <a href="../../../../../org/apache/beam/sdk/io/fs/CreateOptions.html" title="class in org.apache.beam.sdk.io.fs"><code>CreateOptions</code></a>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static java.nio.channels.WritableByteChannel</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#create-org.apache.beam.sdk.io.fs.ResourceId-java.lang.String-">create</a></span>(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&nbsp;resourceId,
java.lang.String&nbsp;mimeType)</code>
<div class="block">Returns a write channel for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#delete-java.util.Collection-org.apache.beam.sdk.io.fs.MoveOptions...-">delete</a></span>(java.util.Collection&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;resourceIds,
<a href="../../../../../org/apache/beam/sdk/io/fs/MoveOptions.html" title="interface in org.apache.beam.sdk.io.fs">MoveOptions</a>...&nbsp;moveOptions)</code>
<div class="block">Deletes a collection of resources.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#hasGlobWildcard-java.lang.String-">hasGlobWildcard</a></span>(java.lang.String&nbsp;spec)</code>
<div class="block">Checks whether the given spec contains a glob wildcard character.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-">match</a></span>(java.util.List&lt;java.lang.String&gt;&nbsp;specs)</code>
<div class="block">This is the entry point to convert user-provided specs to <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceIds</code></a>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-">match</a></span>(java.util.List&lt;java.lang.String&gt;&nbsp;specs,
<a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a>&nbsp;emptyMatchTreatment)</code>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(List)</code></a>, but with a configurable <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs"><code>EmptyMatchTreatment</code></a>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.lang.String-">match</a></span>(java.lang.String&nbsp;spec)</code>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(List)</code></a>, but for a single resource specification.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.lang.String-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-">match</a></span>(java.lang.String&nbsp;spec,
<a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a>&nbsp;emptyMatchTreatment)</code>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.lang.String-"><code>match(String)</code></a>, but with a configurable <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs"><code>EmptyMatchTreatment</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#matchNewResource-java.lang.String-boolean-">matchNewResource</a></span>(java.lang.String&nbsp;singleResourceSpec,
boolean&nbsp;isDirectory)</code>
<div class="block">Returns a new <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a> that represents the named resource of a type corresponding to
the resource type.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#matchResources-java.util.List-">matchResources</a></span>(java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;resourceIds)</code>
<div class="block">Returns <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs"><code>MatchResults</code></a> for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>resourceIds</code></a>.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#matchSingleFileSpec-java.lang.String-">matchSingleFileSpec</a></span>(java.lang.String&nbsp;spec)</code>
<div class="block">Returns the <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs"><code>MatchResult.Metadata</code></a> for a single file resource.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static java.nio.channels.ReadableByteChannel</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#open-org.apache.beam.sdk.io.fs.ResourceId-">open</a></span>(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&nbsp;resourceId)</code>
<div class="block">Returns a read channel for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a>.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#rename-java.util.List-java.util.List-org.apache.beam.sdk.io.fs.MoveOptions...-">rename</a></span>(java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;srcResourceIds,
java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;destResourceIds,
<a href="../../../../../org/apache/beam/sdk/io/fs/MoveOptions.html" title="interface in org.apache.beam.sdk.io.fs">MoveOptions</a>...&nbsp;moveOptions)</code>
<div class="block">Renames a <code>List</code> of file-like resources from one location to another.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#setDefaultPipelineOptions-org.apache.beam.sdk.options.PipelineOptions-">setDefaultPipelineOptions</a></span>(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a>&nbsp;options)</code>
<div class="block">Sets the default configuration in workers.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_SCHEME">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_SCHEME</h4>
<pre>public static final&nbsp;java.lang.String DEFAULT_SCHEME</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.beam.sdk.io.FileSystems.DEFAULT_SCHEME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="FileSystems--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FileSystems</h4>
<pre>public&nbsp;FileSystems()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="hasGlobWildcard-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasGlobWildcard</h4>
<pre>public static&nbsp;boolean&nbsp;hasGlobWildcard(java.lang.String&nbsp;spec)</pre>
<div class="block">Checks whether the given spec contains a glob wildcard character.</div>
</li>
</ul>
<a name="match-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>match</h4>
<pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&gt;&nbsp;match(java.util.List&lt;java.lang.String&gt;&nbsp;specs)
throws java.io.IOException</pre>
<div class="block">This is the entry point to convert user-provided specs to <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceIds</code></a>.
Callers should use <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(java.util.List&lt;java.lang.String&gt;)</code></a> to resolve users specs ambiguities before calling other
methods.
<p>Implementation handles the following ambiguities of a user-provided spec:
<ol>
<li><code>spec</code> could be a glob or a uri. <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(java.util.List&lt;java.lang.String&gt;)</code></a> should be able to tell and choose
efficient implementations.
<li>The user-provided <code>spec</code> might refer to files or directories. It is common that
users that wish to indicate a directory will omit the trailing path delimiter, such as
<code>"/tmp/dir"</code> in Linux. The <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystem</code></a> should be able to recognize a
directory with the trailing path delimiter omitted, but should always return a correct
<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a> (e.g., <code>"/tmp/dir/"</code> inside the returned <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs"><code>MatchResult</code></a>.
</ol>
<p>All <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystem</code></a> implementations should support glob in the final hierarchical path
component of <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a>. This allows SDK libraries to construct file system agnostic
spec. <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystems</code></a> can support additional patterns for user-provided specs.
<p>In case the spec schemes don't match any known <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystem</code></a> implementations,
FileSystems will attempt to use <code>LocalFileSystem</code> to resolve a path.
<p>Specs that do not match any resources are treated according to <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html#DISALLOW"><code>EmptyMatchTreatment.DISALLOW</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>List&lt;MatchResult&gt;</code> in the same order of the input specs.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if specs are invalid -- empty or have different schemes.</dd>
<dd><code>java.io.IOException</code> - if all specs failed to match due to issues like: network connection,
authorization. Exception for individual spec is deferred until callers retrieve metadata
with <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html#metadata--"><code>MatchResult.metadata()</code></a>.</dd>
</dl>
</li>
</ul>
<a name="match-java.util.List-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>match</h4>
<pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&gt;&nbsp;match(java.util.List&lt;java.lang.String&gt;&nbsp;specs,
<a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a>&nbsp;emptyMatchTreatment)
throws java.io.IOException</pre>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(List)</code></a>, but with a configurable <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs"><code>EmptyMatchTreatment</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="match-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>match</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&nbsp;match(java.lang.String&nbsp;spec)
throws java.io.IOException</pre>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(List)</code></a>, but for a single resource specification.
<p>The function <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(List)</code></a> is preferred when matching multiple patterns, as it allows
for bulk API calls to remote filesystems.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="match-java.lang.String-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>match</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&nbsp;match(java.lang.String&nbsp;spec,
<a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a>&nbsp;emptyMatchTreatment)
throws java.io.IOException</pre>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.lang.String-"><code>match(String)</code></a>, but with a configurable <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs"><code>EmptyMatchTreatment</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="matchSingleFileSpec-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchSingleFileSpec</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a>&nbsp;matchSingleFileSpec(java.lang.String&nbsp;spec)
throws java.io.IOException</pre>
<div class="block">Returns the <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs"><code>MatchResult.Metadata</code></a> for a single file resource. Expects a resource specification
<code>spec</code> that matches a single result.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>spec</code> - a resource specification that matches exactly one result.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs"><code>MatchResult.Metadata</code></a> for the specified resource.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.FileNotFoundException</code> - if the file resource is not found.</dd>
<dd><code>java.io.IOException</code> - in the event of an error in the inner call to <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(java.util.List&lt;java.lang.String&gt;)</code></a>, or if the
given spec does not match exactly 1 result.</dd>
</dl>
</li>
</ul>
<a name="matchResources-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchResources</h4>
<pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs">MatchResult</a>&gt;&nbsp;matchResources(java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;resourceIds)
throws java.io.IOException</pre>
<div class="block">Returns <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html" title="class in org.apache.beam.sdk.io.fs"><code>MatchResults</code></a> for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>resourceIds</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resourceIds</code> - <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>resourceIds</code></a> that might be derived from <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>match(java.util.List&lt;java.lang.String&gt;)</code></a>,
<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html#resolve-java.lang.String-org.apache.beam.sdk.io.fs.ResolveOptions-"><code>ResourceId.resolve(java.lang.String, org.apache.beam.sdk.io.fs.ResolveOptions)</code></a>, or <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html#getCurrentDirectory--"><code>ResourceId.getCurrentDirectory()</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if all <code>resourceIds</code> failed to match due to issues like: network
connection, authorization. Exception for individual <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a> need to be deferred
until callers retrieve metadata with <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.html#metadata--"><code>MatchResult.metadata()</code></a>.</dd>
</dl>
</li>
</ul>
<a name="create-org.apache.beam.sdk.io.fs.ResourceId-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;java.nio.channels.WritableByteChannel&nbsp;create(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&nbsp;resourceId,
java.lang.String&nbsp;mimeType)
throws java.io.IOException</pre>
<div class="block">Returns a write channel for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a>.
<p>The resource is not expanded; it is used verbatim.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resourceId</code> - the reference of the file-like resource to create</dd>
<dd><code>mimeType</code> - the mine type of the file-like resource to create</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="create-org.apache.beam.sdk.io.fs.ResourceId-org.apache.beam.sdk.io.fs.CreateOptions-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;java.nio.channels.WritableByteChannel&nbsp;create(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&nbsp;resourceId,
<a href="../../../../../org/apache/beam/sdk/io/fs/CreateOptions.html" title="class in org.apache.beam.sdk.io.fs">CreateOptions</a>&nbsp;createOptions)
throws java.io.IOException</pre>
<div class="block">Returns a write channel for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a> with <a href="../../../../../org/apache/beam/sdk/io/fs/CreateOptions.html" title="class in org.apache.beam.sdk.io.fs"><code>CreateOptions</code></a>.
<p>The resource is not expanded; it is used verbatim.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resourceId</code> - the reference of the file-like resource to create</dd>
<dd><code>createOptions</code> - the configuration of the create operation</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="open-org.apache.beam.sdk.io.fs.ResourceId-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public static&nbsp;java.nio.channels.ReadableByteChannel&nbsp;open(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&nbsp;resourceId)
throws java.io.IOException</pre>
<div class="block">Returns a read channel for the given <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a>.
<p>The resource is not expanded; it is used verbatim.
<p>If seeking is supported, then this returns a <code>SeekableByteChannel</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resourceId</code> - the reference of the file-like resource to open</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="copy-java.util.List-java.util.List-org.apache.beam.sdk.io.fs.MoveOptions...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;void&nbsp;copy(java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;srcResourceIds,
java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;destResourceIds,
<a href="../../../../../org/apache/beam/sdk/io/fs/MoveOptions.html" title="interface in org.apache.beam.sdk.io.fs">MoveOptions</a>...&nbsp;moveOptions)
throws java.io.IOException</pre>
<div class="block">Copies a <code>List</code> of file-like resources from one location to another.
<p>The number of source resources must equal the number of destination resources. Destination
resources will be created recursively.
<p><code>srcResourceIds</code> and <code>destResourceIds</code> must have the same scheme.
<p>It doesn't support copying globs.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcResourceIds</code> - the references of the source resources</dd>
<dd><code>destResourceIds</code> - the references of the destination resources</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="rename-java.util.List-java.util.List-org.apache.beam.sdk.io.fs.MoveOptions...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rename</h4>
<pre>public static&nbsp;void&nbsp;rename(java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;srcResourceIds,
java.util.List&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;destResourceIds,
<a href="../../../../../org/apache/beam/sdk/io/fs/MoveOptions.html" title="interface in org.apache.beam.sdk.io.fs">MoveOptions</a>...&nbsp;moveOptions)
throws java.io.IOException</pre>
<div class="block">Renames a <code>List</code> of file-like resources from one location to another.
<p>The number of source resources must equal the number of destination resources. Destination
resources will be created recursively.
<p><code>srcResourceIds</code> and <code>destResourceIds</code> must have the same scheme.
<p>It doesn't support renaming globs.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcResourceIds</code> - the references of the source resources</dd>
<dd><code>destResourceIds</code> - the references of the destination resources</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="delete-java.util.Collection-org.apache.beam.sdk.io.fs.MoveOptions...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre>public static&nbsp;void&nbsp;delete(java.util.Collection&lt;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&gt;&nbsp;resourceIds,
<a href="../../../../../org/apache/beam/sdk/io/fs/MoveOptions.html" title="interface in org.apache.beam.sdk.io.fs">MoveOptions</a>...&nbsp;moveOptions)
throws java.io.IOException</pre>
<div class="block">Deletes a collection of resources.
<p><code>resourceIds</code> must have the same scheme.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resourceIds</code> - the references of the resources to delete.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="setDefaultPipelineOptions-org.apache.beam.sdk.options.PipelineOptions-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultPipelineOptions</h4>
<pre><a href="../../../../../org/apache/beam/sdk/annotations/Internal.html" title="annotation in org.apache.beam.sdk.annotations">@Internal</a>
public static&nbsp;void&nbsp;setDefaultPipelineOptions(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a>&nbsp;options)</pre>
<div class="block">Sets the default configuration in workers.
<p>It will be used in <a href="../../../../../org/apache/beam/sdk/io/FileSystemRegistrar.html" title="interface in org.apache.beam.sdk.io"><code>FileSystemRegistrars</code></a> for all schemes.
<p>This is expected only to be used by runners after <code>Pipeline.run</code>, or in tests.</div>
</li>
</ul>
<a name="matchNewResource-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>matchNewResource</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>&nbsp;matchNewResource(java.lang.String&nbsp;singleResourceSpec,
boolean&nbsp;isDirectory)</pre>
<div class="block">Returns a new <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs"><code>ResourceId</code></a> that represents the named resource of a type corresponding to
the resource type.
<p>The supplied <code>singleResourceSpec</code> is expected to be in a proper format, including any
necessary escaping, for the underlying <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystem</code></a>.
<p>This function may throw an <code>IllegalArgumentException</code> if given an invalid argument,
such as when the specified <code>singleResourceSpec</code> is not a valid resource name.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/beam/sdk/io/FileSystemRegistrar.html" title="interface in org.apache.beam.sdk.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/io/GenerateSequence.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/io/FileSystems.html" target="_top">Frames</a></li>
<li><a href="FileSystems.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>