You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
deploy: c249eba195
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -1713,6 +1713,12 @@
|
||||
<span id="1708">1708</span>
|
||||
<span id="1709">1709</span>
|
||||
<span id="1710">1710</span>
|
||||
<span id="1711">1711</span>
|
||||
<span id="1712">1712</span>
|
||||
<span id="1713">1713</span>
|
||||
<span id="1714">1714</span>
|
||||
<span id="1715">1715</span>
|
||||
<span id="1716">1716</span>
|
||||
</pre><pre class="rust"><code><span class="attribute">#![<span class="ident">allow</span>(<span class="ident">clippy::missing_safety_doc</span>)]</span>
|
||||
|
||||
<span class="comment">// This file is part of the uutils coreutils package.</span>
|
||||
@@ -1725,9 +1731,6 @@
|
||||
|
||||
<span class="comment">// spell-checker:ignore (ToDO) ficlone linkgs lstat nlink nlinks pathbuf reflink strs xattrs symlinked</span>
|
||||
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">any</span>(<span class="ident">target_os</span> <span class="op">=</span> <span class="string">"linux"</span>, <span class="ident">target_os</span> <span class="op">=</span> <span class="string">"android"</span>))]</span>
|
||||
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
|
||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">ioctl_sys</span>;
|
||||
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
|
||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">quick_error</span>;
|
||||
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
|
||||
@@ -1776,9 +1779,6 @@
|
||||
<span class="kw">use</span> <span class="ident">uucore::fs</span>::{<span class="ident">canonicalize</span>, <span class="ident">MissingHandling</span>, <span class="ident">ResolveMode</span>};
|
||||
<span class="kw">use</span> <span class="ident">walkdir::WalkDir</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">any</span>(<span class="ident">target_os</span> <span class="op">=</span> <span class="string">"linux"</span>, <span class="ident">target_os</span> <span class="op">=</span> <span class="string">"android"</span>))]</span>
|
||||
<span class="macro">ioctl!</span>(<span class="ident">write</span> <span class="ident">ficlone</span> <span class="ident">with</span> <span class="number">0x94</span>, <span class="number">9</span>; <span class="ident">std::os::raw::c_int</span>);
|
||||
|
||||
<span class="macro">quick_error!</span> {
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Error</span> {
|
||||
@@ -1945,6 +1945,16 @@
|
||||
<span class="ident">verbose</span>: <span class="ident">bool</span>,
|
||||
}
|
||||
|
||||
<span class="comment">// From /usr/include/linux/fs.h:</span>
|
||||
<span class="comment">// #define FICLONE _IOW(0x94, 9, int)</span>
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">any</span>(<span class="ident">target_os</span> <span class="op">=</span> <span class="string">"linux"</span>, <span class="ident">target_os</span> <span class="op">=</span> <span class="string">"android"</span>))]</span>
|
||||
<span class="comment">// Use a macro as libc::ioctl expects u32 or u64 depending on the arch</span>
|
||||
<span class="macro">macro_rules!</span> <span class="ident">FICLONE</span> {
|
||||
() => {
|
||||
<span class="number">0x40049409</span>
|
||||
};
|
||||
}
|
||||
|
||||
<span class="kw">static</span> <span class="ident">ABOUT</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY."</span>;
|
||||
<span class="kw">static</span> <span class="ident">LONG_HELP</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">""</span>;
|
||||
<span class="kw">static</span> <span class="ident">EXIT_ERR</span>: <span class="ident">i32</span> <span class="op">=</span> <span class="number">1</span>;
|
||||
@@ -3282,7 +3292,8 @@
|
||||
.<span class="ident">context</span>(<span class="ident">context</span>)<span class="question-mark">?</span>;
|
||||
<span class="kw">match</span> <span class="ident">mode</span> {
|
||||
<span class="ident">ReflinkMode::Always</span> => <span class="kw">unsafe</span> {
|
||||
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">ficlone</span>(<span class="ident">dst_file</span>.<span class="ident">as_raw_fd</span>(), <span class="ident">src_file</span>.<span class="ident">as_raw_fd</span>() <span class="kw">as</span> <span class="kw-2">*const</span> <span class="ident">i32</span>);
|
||||
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">libc::ioctl</span>(<span class="ident">dst_file</span>.<span class="ident">as_raw_fd</span>(), <span class="macro">FICLONE!</span>(), <span class="ident">src_file</span>.<span class="ident">as_raw_fd</span>());
|
||||
|
||||
<span class="kw">if</span> <span class="ident">result</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> {
|
||||
<span class="prelude-val">Err</span>(<span class="macro">format!</span>(
|
||||
<span class="string">"failed to clone {:?} from {:?}: {}"</span>,
|
||||
@@ -3296,7 +3307,8 @@
|
||||
}
|
||||
},
|
||||
<span class="ident">ReflinkMode::Auto</span> => <span class="kw">unsafe</span> {
|
||||
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">ficlone</span>(<span class="ident">dst_file</span>.<span class="ident">as_raw_fd</span>(), <span class="ident">src_file</span>.<span class="ident">as_raw_fd</span>() <span class="kw">as</span> <span class="kw-2">*const</span> <span class="ident">i32</span>);
|
||||
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">libc::ioctl</span>(<span class="ident">dst_file</span>.<span class="ident">as_raw_fd</span>(), <span class="macro">FICLONE!</span>(), <span class="ident">src_file</span>.<span class="ident">as_raw_fd</span>());
|
||||
|
||||
<span class="kw">if</span> <span class="ident">result</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> {
|
||||
<span class="ident">fs::copy</span>(<span class="ident">source</span>, <span class="ident">dest</span>).<span class="ident">context</span>(<span class="ident">context</span>)<span class="question-mark">?</span>;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ specified by the sum of their values."</span>;
|
||||
|
||||
<span class="attribute">#[<span class="ident">uucore::main</span>]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">uumain</span>(<span class="ident">args</span>: <span class="kw">impl</span> <span class="ident">uucore::Args</span>) -> <span class="ident">UResult</span><span class="op"><</span>()<span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">uu_app</span>().<span class="ident">get_matches_from</span>(<span class="ident">args</span>);
|
||||
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">uu_app</span>().<span class="ident">try_get_matches_from</span>(<span class="ident">args</span>)<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">values</span>) <span class="op">=</span> <span class="ident">matches</span>.<span class="ident">values_of</span>(<span class="ident">options::NUMBER</span>) {
|
||||
<span class="kw">let</span> <span class="ident">numbers</span> <span class="op">=</span> <span class="ident">values</span>.<span class="ident">collect</span>::<span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span><span class="op">></span>();
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+12
-12
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ficlone` fn in crate `uu_cp`."><meta name="keywords" content="rust, rustlang, rust-lang, ficlone"><title>ficlone in uu_cp - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><h2 class="location"></h2>
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In uu_cp</a></h2><div id="sidebar-vars" data-name="ficlone" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">ficlone</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#65">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub unsafe fn ficlone(fd: <a class="type" href="https://doc.rust-lang.org/1.61.0/std/os/raw/type.c_int.html" title="type std::os::raw::c_int">c_int</a>, val: <a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.pointer.html">*const </a><a class="type" href="https://doc.rust-lang.org/1.61.0/std/os/raw/type.c_int.html" title="type std::os::raw::c_int">c_int</a>) -> <a class="type" href="https://doc.rust-lang.org/1.61.0/std/os/raw/type.c_int.html" title="type std::os::raw::c_int">c_int</a></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
</body></html>
|
||||
@@ -4,7 +4,7 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In uu_cp</a></h2><div id="sidebar-vars" data-name="localize_to_target" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">localize_to_target</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1679-1682">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn localize_to_target(<br> root: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <br> source: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <br> target: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a><br>) -> <a class="type" href="type.CopyResult.html" title="type uu_cp::CopyResult">CopyResult</a><<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Remove the <code>root</code> prefix from <code>source</code> and prefix it with <code>target</code>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">localize_to_target</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1685-1688">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn localize_to_target(<br> root: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <br> source: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <br> target: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a><br>) -> <a class="type" href="type.CopyResult.html" title="type uu_cp::CopyResult">CopyResult</a><<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Remove the <code>root</code> prefix from <code>source</code> and prefix it with <code>target</code>
|
||||
to create a file that is local to <code>target</code></p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class='information'><div class='tooltip ignore'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore"><code><span class="macro">assert!</span>(<span class="ident">uu_cp::localize_to_target</span>(
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In uu_cp</a></h2><div id="sidebar-vars" data-name="path_has_prefix" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">path_has_prefix</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1692-1697">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn path_has_prefix(p1: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, p2: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="https://doc.rust-lang.org/1.61.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.bool.html">bool</a>></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">path_has_prefix</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1698-1703">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn path_has_prefix(p1: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, p2: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="https://doc.rust-lang.org/1.61.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.bool.html">bool</a>></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
</body></html>
|
||||
@@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In uu_cp</a></h2><div id="sidebar-vars" data-name="paths_refer_to_same_file" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">paths_refer_to_same_file</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1684-1690">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn paths_refer_to_same_file(p1: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, p2: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="https://doc.rust-lang.org/1.61.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.bool.html">bool</a>></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">paths_refer_to_same_file</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1690-1696">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn paths_refer_to_same_file(p1: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, p2: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="https://doc.rust-lang.org/1.61.0/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.bool.html">bool</a>></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
</body></html>
|
||||
@@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In uu_cp</a></h2><div id="sidebar-vars" data-name="uu_app" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">uu_app</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#299-470">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn uu_app<'a>() -> Command<'a></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">uu_app</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#303-474">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn uu_app<'a>() -> Command<'a></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
</body></html>
|
||||
@@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In uu_cp</a></h2><div id="sidebar-vars" data-name="uumain" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">uumain</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#472">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn uumain(args: impl <a class="trait" href="../uucore/trait.Args.html" title="trait uucore::Args">Args</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.i32.html">i32</a></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">uumain</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#476">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn uumain(args: impl <a class="trait" href="../uucore/trait.Args.html" title="trait uucore::Args">Args</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.i32.html">i32</a></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
</body></html>
|
||||
@@ -4,6 +4,6 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In uu_cp</a></h2><div id="sidebar-vars" data-name="verify_target_type" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">verify_target_type</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1654-1666">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn verify_target_type(<br> target: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <br> target_type: &<a class="enum" href="enum.TargetType.html" title="enum uu_cp::TargetType">TargetType</a><br>) -> <a class="type" href="type.CopyResult.html" title="type uu_cp::CopyResult">CopyResult</a><<a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.unit.html">()</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generate an error message if <code>target</code> is not the correct <code>target_type</code></p>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="index.html">uu_cp</a>::<wbr><a class="fn" href="#">verify_target_type</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1660-1672">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn verify_target_type(<br> target: &<a class="struct" href="https://doc.rust-lang.org/1.61.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <br> target_type: &<a class="enum" href="enum.TargetType.html" title="enum uu_cp::TargetType">TargetType</a><br>) -> <a class="type" href="type.CopyResult.html" title="type uu_cp::CopyResult">CopyResult</a><<a class="primitive" href="https://doc.rust-lang.org/1.61.0/std/primitive.unit.html">()</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generate an error message if <code>target</code> is not the correct <code>target_type</code></p>
|
||||
</div></details></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uu_cp" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||||
</body></html>
|
||||
@@ -4,7 +4,7 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../uu_cp/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
|
||||
</a><h2 class="location"><a href="#">Crate uu_cp</a></h2><div class="sidebar-elems"><div class="block"><ul><li class="version">Version 0.0.14</li><li><a id="all-types" href="all.html">All Items</a></li></div></ul><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div></section><div id="sidebar-vars" data-name="uu_cp" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../uu_cp/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">uu_cp</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1-1710">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">uu_cp</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/uu_cp/cp.rs.html#1-1716">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Options.html" title="uu_cp::Options struct">Options</a></div><div class="item-right docblock-short"><p>Re-usable, extensible copy options</p>
|
||||
</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Attribute.html" title="uu_cp::Attribute enum">Attribute</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ClobberMode.html" title="uu_cp::ClobberMode enum">ClobberMode</a></div><div class="item-right docblock-short"><p>Specifies whether when overwrite files</p>
|
||||
@@ -12,7 +12,7 @@
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ReflinkMode.html" title="uu_cp::ReflinkMode enum">ReflinkMode</a></div><div class="item-right docblock-short"><p>Possible arguments for <code>--reflink</code>.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.TargetType.html" title="uu_cp::TargetType enum">TargetType</a></div><div class="item-right docblock-short"><p>Specifies the expected file type of copy target</p>
|
||||
</div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ficlone.html" title="uu_cp::ficlone fn">ficlone</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.localize_to_target.html" title="uu_cp::localize_to_target fn">localize_to_target</a></div><div class="item-right docblock-short"><p>Remove the <code>root</code> prefix from <code>source</code> and prefix it with <code>target</code>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.localize_to_target.html" title="uu_cp::localize_to_target fn">localize_to_target</a></div><div class="item-right docblock-short"><p>Remove the <code>root</code> prefix from <code>source</code> and prefix it with <code>target</code>
|
||||
to create a file that is local to <code>target</code></p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.path_has_prefix.html" title="uu_cp::path_has_prefix fn">path_has_prefix</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.paths_refer_to_same_file.html" title="uu_cp::paths_refer_to_same_file fn">paths_refer_to_same_file</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.uu_app.html" title="uu_cp::uu_app fn">uu_app</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.uumain.html" title="uu_cp::uumain fn">uumain</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.verify_target_type.html" title="uu_cp::verify_target_type fn">verify_target_type</a></div><div class="item-right docblock-short"><p>Generate an error message if <code>target</code> is not the correct <code>target_type</code></p>
|
||||
</div></div></div><h2 id="types" class="small-section-header"><a href="#types">Type Definitions</a></h2>
|
||||
|
||||
@@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["Attribute",""],["ClobberMode","Specifies whether when overwrite files"],["CopyMode",""],["Error",""],["OverwriteMode","Specifies whether when overwrite files"],["ReflinkMode","Possible arguments for `--reflink`."],["TargetType","Specifies the expected file type of copy target"]],"fn":[["ficlone",""],["localize_to_target","Remove the `root` prefix from `source` and prefix it with `target` to create a file that is local to `target`"],["path_has_prefix",""],["paths_refer_to_same_file",""],["uu_app",""],["uumain",""],["verify_target_type","Generate an error message if `target` is not the correct `target_type`"]],"struct":[["Options","Re-usable, extensible copy options"]],"type":[["CopyResult",""],["Source",""],["SourceSlice",""],["Target",""],["TargetSlice",""]]});
|
||||
initSidebarItems({"enum":[["Attribute",""],["ClobberMode","Specifies whether when overwrite files"],["CopyMode",""],["Error",""],["OverwriteMode","Specifies whether when overwrite files"],["ReflinkMode","Possible arguments for `--reflink`."],["TargetType","Specifies the expected file type of copy target"]],"fn":[["localize_to_target","Remove the `root` prefix from `source` and prefix it with `target` to create a file that is local to `target`"],["path_has_prefix",""],["paths_refer_to_same_file",""],["uu_app",""],["uumain",""],["verify_target_type","Generate an error message if `target` is not the correct `target_type`"]],"struct":[["Options","Re-usable, extensible copy options"]],"type":[["CopyResult",""],["Source",""],["SourceSlice",""],["Target",""],["TargetSlice",""]]});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user