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:
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
@@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {
|
||||
"uu_numfmt":[["impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"uu_numfmt/format/struct.WhitespaceSplitter.html\" title=\"struct uu_numfmt::format::WhitespaceSplitter\">WhitespaceSplitter</a><'a>"]],
|
||||
"uu_tail":[["impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"uu_tail/chunks/struct.ReverseChunks.html\" title=\"struct uu_tail::chunks::ReverseChunks\">ReverseChunks</a><'a>"]],
|
||||
"uucore":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"uucore/utmpx/struct.UtmpxIter.html\" title=\"struct uucore::utmpx::UtmpxIter\">UtmpxIter</a>"],["impl<B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/std/io/trait.BufRead.html\" title=\"trait std::io::BufRead\">BufRead</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"uucore/lines/struct.Lines.html\" title=\"struct uucore::lines::Lines\">Lines</a><B>"]]
|
||||
"uucore":[["impl<B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/std/io/trait.BufRead.html\" title=\"trait std::io::BufRead\">BufRead</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"uucore/lines/struct.Lines.html\" title=\"struct uucore::lines::Lines\">Lines</a><B>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"uucore/utmpx/struct.UtmpxIter.html\" title=\"struct uucore::utmpx::UtmpxIter\">UtmpxIter</a>"]]
|
||||
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
||||
@@ -1,9 +1,9 @@
|
||||
(function() {var implementors = {
|
||||
"uu_cp":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.OverwriteMode.html\" title=\"enum uu_cp::OverwriteMode\">OverwriteMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ClobberMode.html\" title=\"enum uu_cp::ClobberMode\">ClobberMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ReflinkMode.html\" title=\"enum uu_cp::ReflinkMode\">ReflinkMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.SparseMode.html\" title=\"enum uu_cp::SparseMode\">SparseMode</a>"]],
|
||||
"uu_cp":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ClobberMode.html\" title=\"enum uu_cp::ClobberMode\">ClobberMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.SparseMode.html\" title=\"enum uu_cp::SparseMode\">SparseMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.OverwriteMode.html\" title=\"enum uu_cp::OverwriteMode\">OverwriteMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ReflinkMode.html\" title=\"enum uu_cp::ReflinkMode\">ReflinkMode</a>"]],
|
||||
"uu_kill":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_kill/enum.Mode.html\" title=\"enum uu_kill::Mode\">Mode</a>"]],
|
||||
"uu_numfmt":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_numfmt/options/enum.RoundMethod.html\" title=\"enum uu_numfmt::options::RoundMethod\">RoundMethod</a>"]],
|
||||
"uu_sort":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_sort/enum.GeneralF64ParseResult.html\" title=\"enum uu_sort::GeneralF64ParseResult\">GeneralF64ParseResult</a>"]],
|
||||
"uu_stty":[["impl<T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"uu_stty/struct.Flag.html\" title=\"struct uu_stty::Flag\">Flag</a><T>"]],
|
||||
"uu_tail":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_tail/args/enum.Signum.html\" title=\"enum uu_tail::args::Signum\">Signum</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_tail/args/enum.FollowMode.html\" title=\"enum uu_tail::args::FollowMode\">FollowMode</a>"]],
|
||||
"uucore":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/fs/enum.ResolveMode.html\" title=\"enum uucore::fs::ResolveMode\">ResolveMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/backup_control/enum.BackupMode.html\" title=\"enum uucore::backup_control::BackupMode\">BackupMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/fs/enum.MissingHandling.html\" title=\"enum uucore::fs::MissingHandling\">MissingHandling</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/quoting_style/enum.Quotes.html\" title=\"enum uucore::quoting_style::Quotes\">Quotes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/encoding/enum.Format.html\" title=\"enum uucore::encoding::Format\">Format</a>"]]
|
||||
"uucore":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/fs/enum.MissingHandling.html\" title=\"enum uucore::fs::MissingHandling\">MissingHandling</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/fs/enum.ResolveMode.html\" title=\"enum uucore::fs::ResolveMode\">ResolveMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/encoding/enum.Format.html\" title=\"enum uucore::encoding::Format\">Format</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/backup_control/enum.BackupMode.html\" title=\"enum uucore::backup_control::BackupMode\">BackupMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.69.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/quoting_style/enum.Quotes.html\" title=\"enum uucore::quoting_style::Quotes\">Quotes</a>"]]
|
||||
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
@@ -213,6 +213,14 @@
|
||||
<a href="#213" id="213">213</a>
|
||||
<a href="#214" id="214">214</a>
|
||||
<a href="#215" id="215">215</a>
|
||||
<a href="#216" id="216">216</a>
|
||||
<a href="#217" id="217">217</a>
|
||||
<a href="#218" id="218">218</a>
|
||||
<a href="#219" id="219">219</a>
|
||||
<a href="#220" id="220">220</a>
|
||||
<a href="#221" id="221">221</a>
|
||||
<a href="#222" id="222">222</a>
|
||||
<a href="#223" id="223">223</a>
|
||||
</pre><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
|
||||
// *
|
||||
// * (c) Nicholas Juszczak <juszczakn@gmail.com>
|
||||
@@ -235,7 +243,7 @@
|
||||
<span class="kw">use </span>uucore::{display::Quotable, fs::dir_strip_dot_for_creation};
|
||||
<span class="kw">use </span>uucore::{format_usage, help_about, help_section, help_usage, show, show_if_err};
|
||||
|
||||
<span class="kw">static </span>DEFAULT_PERM: u32 = <span class="number">0o755</span>;
|
||||
<span class="kw">static </span>DEFAULT_PERM: u32 = <span class="number">0o777</span>;
|
||||
|
||||
<span class="kw">const </span>ABOUT: <span class="kw-2">&</span>str = <span class="macro">help_about!</span>(<span class="string">"mkdir.md"</span>);
|
||||
<span class="kw">const </span>USAGE: <span class="kw-2">&</span>str = <span class="macro">help_usage!</span>(<span class="string">"mkdir.md"</span>);
|
||||
@@ -256,7 +264,7 @@
|
||||
<span class="attr">#[cfg(not(windows))]
|
||||
</span><span class="kw">fn </span>get_mode(matches: <span class="kw-2">&</span>ArgMatches, mode_had_minus_prefix: bool) -> <span class="prelude-ty">Result</span><u32, String> {
|
||||
<span class="kw">let </span>digits: <span class="kw-2">&</span>[char] = <span class="kw-2">&</span>[<span class="string">'0'</span>, <span class="string">'1'</span>, <span class="string">'2'</span>, <span class="string">'3'</span>, <span class="string">'4'</span>, <span class="string">'5'</span>, <span class="string">'6'</span>, <span class="string">'7'</span>, <span class="string">'8'</span>, <span class="string">'9'</span>];
|
||||
<span class="comment">// Translate a ~str in octal form to u16, default to 755
|
||||
<span class="comment">// Translate a ~str in octal form to u16, default to 777
|
||||
// Not tested on Windows
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>new_mode = DEFAULT_PERM;
|
||||
<span class="kw">match </span>matches.get_one::<String>(options::MODE) {
|
||||
@@ -373,7 +381,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>mkdir(path: <span class="kw-2">&</span>Path, recursive: bool, mode: u32, verbose: bool) -> UResult<()> {
|
||||
create_dir(path, recursive, verbose)<span class="question-mark">?</span>;
|
||||
create_dir(path, recursive, verbose, <span class="bool-val">false</span>)<span class="question-mark">?</span>;
|
||||
chmod(path, mode)
|
||||
}
|
||||
|
||||
@@ -394,7 +402,9 @@
|
||||
</span><span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>create_dir(path: <span class="kw-2">&</span>Path, recursive: bool, verbose: bool) -> UResult<()> {
|
||||
<span class="comment">// `is_parent` argument is not used on windows
|
||||
</span><span class="attr">#[allow(unused_variables)]
|
||||
</span><span class="kw">fn </span>create_dir(path: <span class="kw-2">&</span>Path, recursive: bool, verbose: bool, is_parent: bool) -> UResult<()> {
|
||||
<span class="kw">if </span>path.exists() && !recursive {
|
||||
<span class="kw">return </span><span class="prelude-val">Err</span>(USimpleError::new(
|
||||
<span class="number">1</span>,
|
||||
@@ -407,7 +417,7 @@
|
||||
|
||||
<span class="kw">if </span>recursive {
|
||||
<span class="kw">match </span>path.parent() {
|
||||
<span class="prelude-val">Some</span>(p) => create_dir(p, recursive, verbose)<span class="question-mark">?</span>,
|
||||
<span class="prelude-val">Some</span>(p) => create_dir(p, recursive, verbose, <span class="bool-val">true</span>)<span class="question-mark">?</span>,
|
||||
<span class="prelude-val">None </span>=> {
|
||||
USimpleError::new(<span class="number">1</span>, <span class="string">"failed to create whole tree"</span>);
|
||||
}
|
||||
@@ -422,6 +432,12 @@
|
||||
path.quote()
|
||||
);
|
||||
}
|
||||
<span class="attr">#[cfg(not(windows))]
|
||||
</span><span class="kw">if </span>is_parent {
|
||||
<span class="comment">// directories created by -p have permission bits set to '=rwx,u+wx',
|
||||
// which is umask modified by 'u+wx'
|
||||
</span>chmod(path, (!mode::get_umask() & <span class="number">0o0777</span>) | <span class="number">0o0300</span>)<span class="question-mark">?</span>;
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
<span class="prelude-val">Err</span>(<span class="kw">_</span>) <span class="kw">if </span>path.is_dir() => <span class="prelude-val">Ok</span>(()),
|
||||
|
||||
@@ -589,6 +589,13 @@
|
||||
<a href="#589" id="589">589</a>
|
||||
<a href="#590" id="590">590</a>
|
||||
<a href="#591" id="591">591</a>
|
||||
<a href="#592" id="592">592</a>
|
||||
<a href="#593" id="593">593</a>
|
||||
<a href="#594" id="594">594</a>
|
||||
<a href="#595" id="595">595</a>
|
||||
<a href="#596" id="596">596</a>
|
||||
<a href="#597" id="597">597</a>
|
||||
<a href="#598" id="598">598</a>
|
||||
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
|
||||
//
|
||||
// (c) Sunrin SHIMURA
|
||||
@@ -633,6 +640,11 @@
|
||||
|
||||
<span class="kw">static </span>ARG_TEMPLATE: <span class="kw-2">&</span>str = <span class="string">"template"</span>;
|
||||
|
||||
<span class="attr">#[cfg(not(windows))]
|
||||
</span><span class="kw">const </span>TMPDIR_ENV_VAR: <span class="kw-2">&</span>str = <span class="string">"TMPDIR"</span>;
|
||||
<span class="attr">#[cfg(windows)]
|
||||
</span><span class="kw">const </span>TMPDIR_ENV_VAR: <span class="kw-2">&</span>str = <span class="string">"TMP"</span>;
|
||||
|
||||
<span class="attr">#[derive(Debug)]
|
||||
</span><span class="kw">enum </span>MkTempError {
|
||||
PersistError(PathBuf),
|
||||
@@ -782,7 +794,9 @@
|
||||
(tmpdir, template.to_string())
|
||||
}
|
||||
<span class="prelude-val">Some</span>(template) => {
|
||||
<span class="kw">let </span>tmpdir = <span class="kw">if </span>matches.contains_id(OPT_TMPDIR) {
|
||||
<span class="kw">let </span>tmpdir = <span class="kw">if </span>env::var(TMPDIR_ENV_VAR).is_ok() && matches.get_flag(OPT_T) {
|
||||
env::var(TMPDIR_ENV_VAR).ok()
|
||||
} <span class="kw">else if </span>matches.contains_id(OPT_TMPDIR) {
|
||||
matches.get_one::<String>(OPT_TMPDIR).map(String::from)
|
||||
} <span class="kw">else if </span>matches.get_flag(OPT_T) {
|
||||
<span class="comment">// mktemp -t foo.xxx should export in TMPDIR
|
||||
|
||||
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