Skip to content

Commit 8f53573

Browse files
committed
deploy: f0e8d44
1 parent bc3fca7 commit 8f53573

File tree

11 files changed

+37
-15
lines changed

11 files changed

+37
-15
lines changed

dev/src/uu_mv/error.rs.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
<a href="#38" id="38">38</a>
3939
<a href="#39" id="39">39</a>
4040
<a href="#40" id="40">40</a>
41+
<a href="#41" id="41">41</a>
42+
<a href="#42" id="42">42</a>
4143
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
4244
//
4345
// For the full copyright and license information, please view the LICENSE file
@@ -55,6 +57,7 @@
5557
DirectoryToNonDirectory(String),
5658
NonDirectoryToDirectory(String, String),
5759
NotADirectory(String),
60+
TargetNotADirectory(String),
5861
}
5962

6063
<span class="kw">impl </span>Error <span class="kw">for </span>MvError {}
@@ -74,7 +77,8 @@
7477
<span class="self">Self</span>::NonDirectoryToDirectory(s, t) =&gt; {
7578
<span class="macro">write!</span>(f, <span class="string">&quot;cannot overwrite non-directory {t} with directory {s}&quot;</span>)
7679
}
77-
<span class="self">Self</span>::NotADirectory(t) =&gt; <span class="macro">write!</span>(f, <span class="string">&quot;target {t} is not a directory&quot;</span>),
80+
<span class="self">Self</span>::NotADirectory(t) =&gt; <span class="macro">write!</span>(f, <span class="string">&quot;target {t}: Not a directory&quot;</span>),
81+
<span class="self">Self</span>::TargetNotADirectory(t) =&gt; <span class="macro">write!</span>(f, <span class="string">&quot;target directory {t}: Not a directory&quot;</span>),
7882
}
7983
}
8084
}

dev/src/uu_mv/mv.rs.html

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,14 @@
595595
<a href="#595" id="595">595</a>
596596
<a href="#596" id="596">596</a>
597597
<a href="#597" id="597">597</a>
598+
<a href="#598" id="598">598</a>
599+
<a href="#599" id="599">599</a>
600+
<a href="#600" id="600">600</a>
601+
<a href="#601" id="601">601</a>
602+
<a href="#602" id="602">602</a>
603+
<a href="#603" id="603">603</a>
604+
<a href="#604" id="604">604</a>
605+
<a href="#605" id="605">605</a>
598606
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
599607
//
600608
// (c) Orvar Segerström &lt;orvarsegerstrom@gmail.com&gt;
@@ -703,14 +711,22 @@
703711

704712
<span class="kw">let </span>backup_suffix = backup_control::determine_backup_suffix(<span class="kw-2">&amp;</span>matches);
705713

714+
<span class="kw">let </span>target_dir = matches
715+
.get_one::&lt;OsString&gt;(OPT_TARGET_DIRECTORY)
716+
.map(OsString::from);
717+
718+
<span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="kw-2">ref </span>maybe_dir) = target_dir {
719+
<span class="kw">if </span>!Path::new(<span class="kw-2">&amp;</span>maybe_dir).is_dir() {
720+
<span class="kw">return </span><span class="prelude-val">Err</span>(MvError::TargetNotADirectory(maybe_dir.quote().to_string()).into());
721+
}
722+
}
723+
706724
<span class="kw">let </span>behavior = Behavior {
707725
overwrite: overwrite_mode,
708726
backup: backup_mode,
709727
suffix: backup_suffix,
710728
update: matches.get_flag(OPT_UPDATE),
711-
target_dir: matches
712-
.get_one::&lt;OsString&gt;(OPT_TARGET_DIRECTORY)
713-
.map(OsString::from),
729+
target_dir,
714730
no_target_dir: matches.get_flag(OPT_NO_TARGET_DIRECTORY),
715731
verbose: matches.get_flag(OPT_VERBOSE),
716732
strip_slashes: matches.get_flag(OPT_STRIP_TRAILING_SLASHES),

dev/src/uu_sync/sync.rs.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
<a href="#243" id="243">243</a>
244244
<a href="#244" id="244">244</a>
245245
<a href="#245" id="245">245</a>
246+
<a href="#246" id="246">246</a>
246247
</pre><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
247248
// *
248249
// * (c) Alexander Fomin &lt;xander.fomin@ya.ru&gt;
@@ -264,10 +265,11 @@
264265
<span class="attr">#[cfg(any(target_os = <span class="string">&quot;linux&quot;</span>, target_os = <span class="string">&quot;android&quot;</span>))]
265266
</span><span class="kw">use </span>uucore::error::FromIo;
266267
<span class="kw">use </span>uucore::error::{UResult, USimpleError};
267-
<span class="kw">use </span>uucore::format_usage;
268+
<span class="kw">use </span>uucore::{format_usage, help_about, help_usage};
269+
270+
<span class="kw">const </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="macro">help_about!</span>(<span class="string">&quot;sync.md&quot;</span>);
271+
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="macro">help_usage!</span>(<span class="string">&quot;sync.md&quot;</span>);
268272

269-
<span class="kw">static </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="string">&quot;Synchronize cached writes to persistent storage&quot;</span>;
270-
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="string">&quot;{} [OPTION]... FILE...&quot;</span>;
271273
<span class="kw">pub mod </span>options {
272274
<span class="kw">pub static </span>FILE_SYSTEM: <span class="kw-2">&amp;</span>str = <span class="string">&quot;file-system&quot;</span>;
273275
<span class="kw">pub static </span>DATA: <span class="kw-2">&amp;</span>str = <span class="string">&quot;data&quot;</span>;

dev/uu_mv/fn.uu_app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!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 `uu_app` fn in crate `uu_mv`."><title>uu_app in uu_mv - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-c4dbdcde0fbd8430.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-db279b6232be9c13.css"><link rel="stylesheet" disabled href="../static.files/dark-cf923f49f397b216.css"><link rel="stylesheet" disabled href="../static.files/ayu-be46fdc453a55015.css"><script src="../static.files/storage-3891ce972e3a2bf8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-98a684e84ae5b08b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.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">&#9776;</button><a class="logo-container" href="../uu_mv/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../uu_mv/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In uu_mv</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="index.html">uu_mv</a>::<wbr><a class="fn" href="#">uu_app</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/uu_mv/mv.rs.html#126-214">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn uu_app() -&gt; Command</code></pre></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uu_mv" data-themes="" data-resource-suffix="" data-rustdoc-version="1.69.0 (84c898d65 2023-04-16)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>
1+
<!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 `uu_app` fn in crate `uu_mv`."><title>uu_app in uu_mv - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-c4dbdcde0fbd8430.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-db279b6232be9c13.css"><link rel="stylesheet" disabled href="../static.files/dark-cf923f49f397b216.css"><link rel="stylesheet" disabled href="../static.files/ayu-be46fdc453a55015.css"><script src="../static.files/storage-3891ce972e3a2bf8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-98a684e84ae5b08b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.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">&#9776;</button><a class="logo-container" href="../uu_mv/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../uu_mv/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In uu_mv</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="index.html">uu_mv</a>::<wbr><a class="fn" href="#">uu_app</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/uu_mv/mv.rs.html#134-222">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn uu_app() -&gt; Command</code></pre></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uu_mv" data-themes="" data-resource-suffix="" data-rustdoc-version="1.69.0 (84c898d65 2023-04-16)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

0 commit comments

Comments
 (0)