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: f0e8d44e6e
This commit is contained in:
@@ -266,6 +266,12 @@
|
||||
<a href="#266" id="266">266</a>
|
||||
<a href="#267" id="267">267</a>
|
||||
<a href="#268" id="268">268</a>
|
||||
<a href="#269" id="269">269</a>
|
||||
<a href="#270" id="270">270</a>
|
||||
<a href="#271" id="271">271</a>
|
||||
<a href="#272" id="272">272</a>
|
||||
<a href="#273" id="273">273</a>
|
||||
<a href="#274" id="274">274</a>
|
||||
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
|
||||
//
|
||||
// (c) Michael Gehring <mg@ebfe.org>
|
||||
@@ -427,8 +433,14 @@
|
||||
div_ceil(sz, options.output_bits),
|
||||
filename.display()
|
||||
),
|
||||
(<span class="kw">_</span>, <span class="bool-val">true</span>) => <span class="macro">println!</span>(<span class="string">"{sum} {sz}"</span>),
|
||||
(<span class="kw">_</span>, <span class="bool-val">false</span>) => <span class="macro">println!</span>(<span class="string">"{sum} {sz} {}"</span>, filename.display()),
|
||||
(ALGORITHM_OPTIONS_CRC, <span class="bool-val">true</span>) => <span class="macro">println!</span>(<span class="string">"{sum} {sz}"</span>),
|
||||
(ALGORITHM_OPTIONS_CRC, <span class="bool-val">false</span>) => <span class="macro">println!</span>(<span class="string">"{sum} {sz} {}"</span>, filename.display()),
|
||||
(ALGORITHM_OPTIONS_BLAKE2B, <span class="kw">_</span>) => <span class="macro">println!</span>(<span class="string">"BLAKE2b ({}) = {sum}"</span>, filename.display()),
|
||||
<span class="kw">_ </span>=> <span class="macro">println!</span>(
|
||||
<span class="string">"{} ({}) = {sum}"</span>,
|
||||
options.algo_name.to_ascii_uppercase(),
|
||||
filename.display()
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1890,6 +1890,32 @@
|
||||
<a href="#1890" id="1890">1890</a>
|
||||
<a href="#1891" id="1891">1891</a>
|
||||
<a href="#1892" id="1892">1892</a>
|
||||
<a href="#1893" id="1893">1893</a>
|
||||
<a href="#1894" id="1894">1894</a>
|
||||
<a href="#1895" id="1895">1895</a>
|
||||
<a href="#1896" id="1896">1896</a>
|
||||
<a href="#1897" id="1897">1897</a>
|
||||
<a href="#1898" id="1898">1898</a>
|
||||
<a href="#1899" id="1899">1899</a>
|
||||
<a href="#1900" id="1900">1900</a>
|
||||
<a href="#1901" id="1901">1901</a>
|
||||
<a href="#1902" id="1902">1902</a>
|
||||
<a href="#1903" id="1903">1903</a>
|
||||
<a href="#1904" id="1904">1904</a>
|
||||
<a href="#1905" id="1905">1905</a>
|
||||
<a href="#1906" id="1906">1906</a>
|
||||
<a href="#1907" id="1907">1907</a>
|
||||
<a href="#1908" id="1908">1908</a>
|
||||
<a href="#1909" id="1909">1909</a>
|
||||
<a href="#1910" id="1910">1910</a>
|
||||
<a href="#1911" id="1911">1911</a>
|
||||
<a href="#1912" id="1912">1912</a>
|
||||
<a href="#1913" id="1913">1913</a>
|
||||
<a href="#1914" id="1914">1914</a>
|
||||
<a href="#1915" id="1915">1915</a>
|
||||
<a href="#1916" id="1916">1916</a>
|
||||
<a href="#1917" id="1917">1917</a>
|
||||
<a href="#1918" id="1918">1918</a>
|
||||
</pre><pre class="rust"><code><span class="attr">#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::extra_unused_lifetimes)]
|
||||
|
||||
@@ -3596,6 +3622,11 @@
|
||||
}
|
||||
|
||||
copy_attributes(source, dest, <span class="kw-2">&</span>options.attributes)<span class="question-mark">?</span>;
|
||||
<span class="kw">if </span>options.parents && should_preserve_attribute(options) {
|
||||
<span class="kw">for </span>(x, y) <span class="kw">in </span>aligned_ancestors(source, dest) {
|
||||
copy_attributes(x, y, <span class="kw-2">&</span>options.attributes)<span class="question-mark">?</span>;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(progress_bar) = progress_bar {
|
||||
progress_bar.inc(fs::metadata(source)<span class="question-mark">?</span>.len());
|
||||
@@ -3645,6 +3676,27 @@
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>should_preserve_attribute(options: <span class="kw-2">&</span>Options) -> bool {
|
||||
<span class="kw">let </span>checks = [
|
||||
<span class="kw-2">&</span>options.attributes.mode,
|
||||
<span class="kw-2">&</span>options.attributes.timestamps,
|
||||
<span class="kw-2">&</span>options.attributes.links,
|
||||
<span class="kw-2">&</span>options.attributes.context,
|
||||
<span class="kw-2">&</span>options.attributes.xattr,
|
||||
];
|
||||
|
||||
<span class="attr">#[cfg(unix)]
|
||||
</span><span class="kw">let </span>checks = [
|
||||
checks.as_slice(),
|
||||
[<span class="kw-2">&</span>options.attributes.ownership].as_slice(),
|
||||
]
|
||||
.concat();
|
||||
|
||||
checks
|
||||
.iter()
|
||||
.any(|attr| <span class="macro">matches!</span>(attr, Preserve::Yes { .. }))
|
||||
}
|
||||
|
||||
<span class="comment">// "Copies" a FIFO by creating a new one. This workaround is because Rust's
|
||||
// built-in fs::copy does not handle FIFOs (see rust-lang/rust/issues/79390).
|
||||
</span><span class="attr">#[cfg(unix)]
|
||||
|
||||
@@ -3117,6 +3117,18 @@
|
||||
<a href="#3117" id="3117">3117</a>
|
||||
<a href="#3118" id="3118">3118</a>
|
||||
<a href="#3119" id="3119">3119</a>
|
||||
<a href="#3120" id="3120">3120</a>
|
||||
<a href="#3121" id="3121">3121</a>
|
||||
<a href="#3122" id="3122">3122</a>
|
||||
<a href="#3123" id="3123">3123</a>
|
||||
<a href="#3124" id="3124">3124</a>
|
||||
<a href="#3125" id="3125">3125</a>
|
||||
<a href="#3126" id="3126">3126</a>
|
||||
<a href="#3127" id="3127">3127</a>
|
||||
<a href="#3128" id="3128">3128</a>
|
||||
<a href="#3129" id="3129">3129</a>
|
||||
<a href="#3130" id="3130">3130</a>
|
||||
<a href="#3131" id="3131">3131</a>
|
||||
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
|
||||
//
|
||||
// (c) Jeremiah Peschka <jeremiah.peschka@gmail.com>
|
||||
@@ -3160,7 +3172,13 @@
|
||||
target_os = <span class="string">"linux"</span>,
|
||||
target_os = <span class="string">"macos"</span>,
|
||||
target_os = <span class="string">"android"</span>,
|
||||
target_os = <span class="string">"ios"
|
||||
target_os = <span class="string">"ios"</span>,
|
||||
target_os = <span class="string">"freebsd"</span>,
|
||||
target_os = <span class="string">"dragonfly"</span>,
|
||||
target_os = <span class="string">"netbsd"</span>,
|
||||
target_os = <span class="string">"openbsd"</span>,
|
||||
target_os = <span class="string">"illumos"</span>,
|
||||
target_os = <span class="string">"solaris"
|
||||
</span>))]
|
||||
</span><span class="kw">use </span>uucore::libc::{dev_t, major, minor};
|
||||
<span class="attr">#[cfg(unix)]
|
||||
@@ -5835,7 +5853,13 @@
|
||||
target_os = <span class="string">"linux"</span>,
|
||||
target_os = <span class="string">"macos"</span>,
|
||||
target_os = <span class="string">"android"</span>,
|
||||
target_os = <span class="string">"ios"
|
||||
target_os = <span class="string">"ios"</span>,
|
||||
target_os = <span class="string">"freebsd"</span>,
|
||||
target_os = <span class="string">"dragonfly"</span>,
|
||||
target_os = <span class="string">"netbsd"</span>,
|
||||
target_os = <span class="string">"openbsd"</span>,
|
||||
target_os = <span class="string">"illumos"</span>,
|
||||
target_os = <span class="string">"solaris"
|
||||
</span>))]
|
||||
</span>{
|
||||
<span class="kw">let </span>ft = metadata.file_type();
|
||||
|
||||
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
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
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
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
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user