selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
37 lines • 7.75 kB
HTML
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"><meta http-equiv="Content-Language" content="en"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>selenium-webdriver/io</title><link href="dossier.css" rel="stylesheet" type="text/css"><header><div><form><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></header><main><article><div class="codelink"><a href="source/io/index.js.src.html#l18">View Source</a></div><h1>module selenium-webdriver/io</h1><h2>Functions</h2><div id="copy" class="function"><div><h3>copy(<wbr>src, dst)<span class="codelink"><a href="source/io/index.js.src.html#l66">code »</a></span></h3><p>Copies one file to another.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>src<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The source file.</p>
<dt>dst<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The destination file.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise for the copied file's path.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="copyDir" class="function"><div><h3>copyDir(<wbr>src, dst, opt_exclude)<span class="codelink"><a href="source/io/index.js.src.html#l94">code »</a></span></h3><p>Recursively copies the contents of one directory to another.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>src<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The source directory to copy.</p>
<dt>dst<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The directory to copy into.</p>
<dt>opt_exclude<code>?(RegEx|function(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>)=</code><dd><p>An exclusion filter
as either a regex or predicate function. All files matching this filter
will not be copied.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise for the destination
directory's path once all files have been copied.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="exists" class="function"><div><h3>exists(<wbr>path)<span class="codelink"><a href="source/io/index.js.src.html#l142">code »</a></span></h3><p>Tests if a file path exists.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>path<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The path to test.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise for whether the file exists.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="findInPath" class="function"><div><h3>findInPath(<wbr>file, opt_checkCwd)<span class="codelink"><a href="source/io/index.js.src.html#l204">code »</a></span></h3><p>Searches the <code>PATH</code> environment variable for the given file.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>file<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The file to locate on the PATH.</p>
<dt>opt_checkCwd<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd><p>Whether to always start with the search with
the current working directory, regardless of whether it is explicitly
listed on the PATH.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code>?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>Path to the located file, or <code>null</code> if it could
not be found.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="rmDir" class="function"><div><h3>rmDir(<wbr>path)<span class="codelink"><a href="source/io/index.js.src.html#l38">code »</a></span></h3><p>Recursively removes a directory and all of its contents. This is equivalent
to <code>rm -rf</code> on a POSIX system.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>path<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>Path to the directory to remove.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise to be resolved when the operation has
completed.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="tmpDir" class="function"><div><h3>tmpDir()<span class="codelink"><a href="source/io/index.js.src.html#l175">code »</a></span></h3><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise for the path to a temporary
directory.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="tmpFile" class="function"><div><h3>tmpFile(<wbr>opt_options)<span class="codelink"><a href="source/io/index.js.src.html#l186">code »</a></span></h3><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>opt_options<code>{postfix: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}=</code><dd><p>Temporary file options.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise for the path to a temporary
file.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="unlink" class="function"><div><h3>unlink(<wbr>path)<span class="codelink"><a href="source/io/index.js.src.html#l155">code »</a></span></h3><p>Deletes a name from the filesystem and possibly the file it refers to. Has
no effect if the file does not exist.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>path<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The path to remove.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code><dd><p>A promise for when the file has been removed.</p>
</dl></div></div></div></div></article><nav><h3><a href="index.html" tabindex="2">Overview</a></h3><div><input type="checkbox" id="nav-modules" checked/><label for="nav-modules"><h3><span class="selectable" tabindex="2">Modules</span></h3></label><div id="nav-modules-view"></div></div><div><input type="checkbox" id="nav-types" checked/><label for="nav-types"><h3><span class="selectable" tabindex="2">Types</span></h3></label><div id="nav-types-view"></div></div><h3><a href="Changes.html" tabindex="2">Changes</a></h3></nav></main><footer><div><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></div></footer><script src="types.js"></script><script src="dossier.js"></script>