diff --git a/yazi-adaptor/src/image.rs b/yazi-adaptor/src/image.rs index 61643206..ae887b93 100644 --- a/yazi-adaptor/src/image.rs +++ b/yazi-adaptor/src/image.rs @@ -3,7 +3,7 @@ use std::{fs::File, io::BufReader, path::{Path, PathBuf}}; use anyhow::Result; use image::{imageops::FilterType, io::Limits, DynamicImage, ImageFormat}; use yazi_config::{PREVIEW, TASKS}; -use yazi_shared::Term; +use yazi_shared::term::Term; pub struct Image; diff --git a/yazi-adaptor/src/iterm2.rs b/yazi-adaptor/src/iterm2.rs index d1655135..4ca13bc4 100644 --- a/yazi-adaptor/src/iterm2.rs +++ b/yazi-adaptor/src/iterm2.rs @@ -4,7 +4,7 @@ use anyhow::Result; use base64::{engine::general_purpose, Engine}; use image::{codecs::jpeg::JpegEncoder, DynamicImage}; use ratatui::prelude::Rect; -use yazi_shared::Term; +use yazi_shared::term::Term; use super::image::Image; use crate::{CLOSE, START}; diff --git a/yazi-adaptor/src/kitty.rs b/yazi-adaptor/src/kitty.rs index 64686a90..86a35880 100644 --- a/yazi-adaptor/src/kitty.rs +++ b/yazi-adaptor/src/kitty.rs @@ -4,7 +4,7 @@ use anyhow::Result; use base64::{engine::general_purpose, Engine}; use image::DynamicImage; use ratatui::prelude::Rect; -use yazi_shared::Term; +use yazi_shared::term::Term; use super::image::Image; use crate::{CLOSE, ESCAPE, START}; diff --git a/yazi-adaptor/src/kitty_old.rs b/yazi-adaptor/src/kitty_old.rs index 72e9f2fa..1dffaaa8 100644 --- a/yazi-adaptor/src/kitty_old.rs +++ b/yazi-adaptor/src/kitty_old.rs @@ -4,7 +4,7 @@ use anyhow::Result; use base64::{engine::general_purpose, Engine}; use image::DynamicImage; use ratatui::prelude::Rect; -use yazi_shared::Term; +use yazi_shared::term::Term; use super::image::Image; use crate::{CLOSE, ESCAPE, START}; diff --git a/yazi-adaptor/src/sixel.rs b/yazi-adaptor/src/sixel.rs index feb90ed8..ac899dcd 100644 --- a/yazi-adaptor/src/sixel.rs +++ b/yazi-adaptor/src/sixel.rs @@ -4,7 +4,7 @@ use anyhow::{bail, Result}; use color_quant::NeuQuant; use image::DynamicImage; use ratatui::prelude::Rect; -use yazi_shared::Term; +use yazi_shared::term::Term; use crate::{Image, CLOSE, ESCAPE, START}; diff --git a/yazi-config/src/manager/layout.rs b/yazi-config/src/manager/layout.rs index 3123f2c7..61cbb346 100644 --- a/yazi-config/src/manager/layout.rs +++ b/yazi-config/src/manager/layout.rs @@ -2,7 +2,7 @@ use anyhow::bail; use crossterm::terminal::WindowSize; use ratatui::{prelude::Rect, widgets::{Block, Padding}}; use serde::{Deserialize, Serialize}; -use yazi_shared::Term; +use yazi_shared::term::Term; use crate::{PREVIEW, THEME}; diff --git a/yazi-config/src/popup/position.rs b/yazi-config/src/popup/position.rs index 4964e10b..a67e44da 100644 --- a/yazi-config/src/popup/position.rs +++ b/yazi-config/src/popup/position.rs @@ -1,6 +1,6 @@ use crossterm::terminal::WindowSize; use ratatui::layout::Rect; -use yazi_shared::Term; +use yazi_shared::term::Term; use super::{Offset, Origin}; diff --git a/yazi-core/src/event.rs b/yazi-core/src/event.rs index 485f7972..65416100 100644 --- a/yazi-core/src/event.rs +++ b/yazi-core/src/event.rs @@ -4,7 +4,7 @@ use anyhow::Result; use crossterm::event::KeyEvent; use tokio::sync::{mpsc::{self, UnboundedSender}, oneshot}; use yazi_config::{keymap::{Exec, KeymapLayer}, open::Opener, popup::{InputOpt, SelectOpt}}; -use yazi_shared::{InputError, RoCell, Url}; +use yazi_shared::{fs::Url, InputError, RoCell}; use super::files::FilesOp; use crate::{preview::PreviewLock, tasks::TasksProgress}; diff --git a/yazi-core/src/external/fd.rs b/yazi-core/src/external/fd.rs index 1d1fec64..d8a073e7 100644 --- a/yazi-core/src/external/fd.rs +++ b/yazi-core/src/external/fd.rs @@ -2,7 +2,7 @@ use std::process::Stdio; use anyhow::Result; use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command, sync::mpsc::{self, UnboundedReceiver}}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::files::File; diff --git a/yazi-core/src/external/file.rs b/yazi-core/src/external/file.rs index b4b61d16..def1f72b 100644 --- a/yazi-core/src/external/file.rs +++ b/yazi-core/src/external/file.rs @@ -4,7 +4,7 @@ use anyhow::{bail, Result}; use futures::TryFutureExt; use tokio::process::Command; use tracing::error; -use yazi_shared::{MimeKind, Url}; +use yazi_shared::{fs::Url, MimeKind}; async fn _file(files: &[&Url]) -> Result> { if files.is_empty() { diff --git a/yazi-core/src/external/fzf.rs b/yazi-core/src/external/fzf.rs index dfe67329..dabfe8c5 100644 --- a/yazi-core/src/external/fzf.rs +++ b/yazi-core/src/external/fzf.rs @@ -2,7 +2,7 @@ use std::{path::Path, process::Stdio}; use anyhow::{bail, Result}; use tokio::process::Command; -use yazi_shared::Url; +use yazi_shared::fs::Url; pub struct FzfOpt { pub cwd: Url, diff --git a/yazi-core/src/external/rg.rs b/yazi-core/src/external/rg.rs index 9220c5b0..6292a3ae 100644 --- a/yazi-core/src/external/rg.rs +++ b/yazi-core/src/external/rg.rs @@ -2,7 +2,7 @@ use std::process::Stdio; use anyhow::Result; use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command, sync::mpsc::{self, UnboundedReceiver}}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::files::File; diff --git a/yazi-core/src/external/zoxide.rs b/yazi-core/src/external/zoxide.rs index 11900af8..23d4ff2c 100644 --- a/yazi-core/src/external/zoxide.rs +++ b/yazi-core/src/external/zoxide.rs @@ -2,7 +2,7 @@ use std::process::Stdio; use anyhow::{bail, Result}; use tokio::process::Command; -use yazi_shared::Url; +use yazi_shared::fs::Url; pub struct ZoxideOpt { pub cwd: Url, diff --git a/yazi-core/src/files/file.rs b/yazi-core/src/files/file.rs index 732e448f..f4f82502 100644 --- a/yazi-core/src/files/file.rs +++ b/yazi-core/src/files/file.rs @@ -2,7 +2,7 @@ use std::{borrow::Cow, collections::BTreeMap, ffi::OsStr, fs::Metadata, ops::Der use anyhow::Result; use tokio::fs; -use yazi_shared::{Cha, ChaKind, Url}; +use yazi_shared::fs::{Cha, ChaKind, Url}; #[derive(Clone, Debug, Default)] pub struct File { diff --git a/yazi-core/src/files/files.rs b/yazi-core/src/files/files.rs index a11d89ad..ffe5b2db 100644 --- a/yazi-core/src/files/files.rs +++ b/yazi-core/src/files/files.rs @@ -3,7 +3,7 @@ use std::{collections::{BTreeMap, BTreeSet}, mem, ops::Deref, sync::atomic::Orde use anyhow::Result; use tokio::{fs, select, sync::mpsc::{self, UnboundedReceiver}}; use yazi_config::{manager::SortBy, MANAGER}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use super::{File, FilesSorter, FILES_TICKET}; diff --git a/yazi-core/src/files/op.rs b/yazi-core/src/files/op.rs index 3337c16b..5ca32b28 100644 --- a/yazi-core/src/files/op.rs +++ b/yazi-core/src/files/op.rs @@ -1,6 +1,6 @@ use std::{collections::{BTreeMap, BTreeSet}, sync::atomic::{AtomicU64, Ordering}}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use super::File; use crate::emit; diff --git a/yazi-core/src/files/sorter.rs b/yazi-core/src/files/sorter.rs index 580891bc..e214d172 100644 --- a/yazi-core/src/files/sorter.rs +++ b/yazi-core/src/files/sorter.rs @@ -1,7 +1,7 @@ use std::{cmp::Ordering, collections::BTreeMap, mem}; use yazi_config::manager::SortBy; -use yazi_shared::{natsort, Url}; +use yazi_shared::{fs::Url, natsort}; use super::File; diff --git a/yazi-core/src/help/help.rs b/yazi-core/src/help/help.rs index 4da65c18..9399d4b2 100644 --- a/yazi-core/src/help/help.rs +++ b/yazi-core/src/help/help.rs @@ -1,7 +1,7 @@ use crossterm::event::KeyCode; use unicode_width::UnicodeWidthStr; use yazi_config::{keymap::{Control, Key, KeymapLayer}, KEYMAP}; -use yazi_shared::Term; +use yazi_shared::term::Term; use super::HELP_MARGIN; use crate::input::Input; diff --git a/yazi-core/src/manager/commands/create.rs b/yazi-core/src/manager/commands/create.rs index 64fbad46..0eb94393 100644 --- a/yazi-core/src/manager/commands/create.rs +++ b/yazi-core/src/manager/commands/create.rs @@ -2,7 +2,7 @@ use std::path::{PathBuf, MAIN_SEPARATOR}; use tokio::fs; use yazi_config::{keymap::Exec, popup::InputOpt}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::{emit, files::{File, FilesOp}, manager::Manager}; diff --git a/yazi-core/src/manager/commands/hover.rs b/yazi-core/src/manager/commands/hover.rs index a68c7e90..35bc32a2 100644 --- a/yazi-core/src/manager/commands/hover.rs +++ b/yazi-core/src/manager/commands/hover.rs @@ -1,7 +1,7 @@ use std::collections::BTreeSet; use yazi_config::keymap::{Exec, KeymapLayer}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::{emit, manager::Manager}; diff --git a/yazi-core/src/manager/commands/peek.rs b/yazi-core/src/manager/commands/peek.rs index bfafb5d5..c8367187 100644 --- a/yazi-core/src/manager/commands/peek.rs +++ b/yazi-core/src/manager/commands/peek.rs @@ -1,5 +1,5 @@ use yazi_config::{keymap::{Exec, KeymapLayer}, MANAGER}; -use yazi_shared::{Url, MIME_DIR}; +use yazi_shared::{fs::Url, MIME_DIR}; use crate::{emit, manager::Manager}; diff --git a/yazi-core/src/manager/commands/rename.rs b/yazi-core/src/manager/commands/rename.rs index 8391e894..482dd9aa 100644 --- a/yazi-core/src/manager/commands/rename.rs +++ b/yazi-core/src/manager/commands/rename.rs @@ -3,7 +3,7 @@ use std::{collections::BTreeMap, ffi::OsStr, io::{stdout, BufWriter, Write}, pat use anyhow::{anyhow, bail, Result}; use tokio::{fs::{self, OpenOptions}, io::{stdin, AsyncReadExt, AsyncWriteExt}}; use yazi_config::{keymap::Exec, popup::InputOpt, OPEN, PREVIEW}; -use yazi_shared::{max_common_root, Defer, Term, Url}; +use yazi_shared::{fs::{max_common_root, Url}, term::Term, Defer}; use crate::{emit, external::{self, ShellOpt}, files::{File, FilesOp}, manager::Manager, Event, BLOCKER}; diff --git a/yazi-core/src/manager/commands/tab_create.rs b/yazi-core/src/manager/commands/tab_create.rs index e125a6c5..2dd072f7 100644 --- a/yazi-core/src/manager/commands/tab_create.rs +++ b/yazi-core/src/manager/commands/tab_create.rs @@ -1,5 +1,5 @@ use yazi_config::keymap::Exec; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::{manager::Tabs, tab::Tab}; diff --git a/yazi-core/src/manager/manager.rs b/yazi-core/src/manager/manager.rs index 9846a00e..55e2a7c3 100644 --- a/yazi-core/src/manager/manager.rs +++ b/yazi-core/src/manager/manager.rs @@ -1,6 +1,6 @@ use std::collections::{BTreeMap, HashMap, HashSet}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use super::{Tabs, Watcher}; use crate::{files::{File, FilesOp}, tab::{Folder, Tab}, tasks::Tasks}; diff --git a/yazi-core/src/manager/tabs.rs b/yazi-core/src/manager/tabs.rs index a235fcaa..0f8a882d 100644 --- a/yazi-core/src/manager/tabs.rs +++ b/yazi-core/src/manager/tabs.rs @@ -1,5 +1,5 @@ use yazi_config::BOOT; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::{manager::Manager, tab::Tab}; diff --git a/yazi-core/src/manager/watcher.rs b/yazi-core/src/manager/watcher.rs index 3d862a57..1636698e 100644 --- a/yazi-core/src/manager/watcher.rs +++ b/yazi-core/src/manager/watcher.rs @@ -5,7 +5,7 @@ use notify::{event::{MetadataKind, ModifyKind}, EventKind, RecommendedWatcher, R use parking_lot::RwLock; use tokio::{fs, pin, sync::mpsc::{self, UnboundedReceiver}}; use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::{emit, external, files::{File, Files, FilesOp}}; diff --git a/yazi-core/src/preview/preview.rs b/yazi-core/src/preview/preview.rs index 5ba3e75b..4dccbe38 100644 --- a/yazi-core/src/preview/preview.rs +++ b/yazi-core/src/preview/preview.rs @@ -4,7 +4,7 @@ use tokio::{pin, task::JoinHandle}; use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; use yazi_adaptor::ADAPTOR; use yazi_config::MANAGER; -use yazi_shared::{Cha, MimeKind, PeekError, Url}; +use yazi_shared::{fs::{Cha, Url}, MimeKind, PeekError}; use super::Provider; use crate::{emit, files::{Files, FilesOp}, manager::Manager, Highlighter}; diff --git a/yazi-core/src/tab/commands/cd.rs b/yazi-core/src/tab/commands/cd.rs index ebdce216..b4c30cf2 100644 --- a/yazi-core/src/tab/commands/cd.rs +++ b/yazi-core/src/tab/commands/cd.rs @@ -3,7 +3,7 @@ use std::{mem, time::Duration}; use tokio::{fs, pin}; use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; use yazi_config::{keymap::{Exec, KeymapLayer}, popup::InputOpt}; -use yazi_shared::{expand_path, Debounce, InputError, Url}; +use yazi_shared::{expand_path, fs::Url, Debounce, InputError}; use crate::{completion::Completion, emit, manager::Manager, tab::Tab}; diff --git a/yazi-core/src/tab/commands/reveal.rs b/yazi-core/src/tab/commands/reveal.rs index 00f481c4..e1ba2e42 100644 --- a/yazi-core/src/tab/commands/reveal.rs +++ b/yazi-core/src/tab/commands/reveal.rs @@ -1,5 +1,5 @@ use yazi_config::keymap::{Exec, KeymapLayer}; -use yazi_shared::{expand_path, Url}; +use yazi_shared::{expand_path, fs::Url}; use crate::{emit, files::{File, FilesOp}, manager::Manager, tab::Tab}; diff --git a/yazi-core/src/tab/finder.rs b/yazi-core/src/tab/finder.rs index db6112b0..8ed6101c 100644 --- a/yazi-core/src/tab/finder.rs +++ b/yazi-core/src/tab/finder.rs @@ -2,7 +2,7 @@ use std::{collections::BTreeMap, ffi::OsStr, ops::Range}; use anyhow::Result; use regex::bytes::{Regex, RegexBuilder}; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::files::Files; diff --git a/yazi-core/src/tab/folder.rs b/yazi-core/src/tab/folder.rs index 923def05..b7596569 100644 --- a/yazi-core/src/tab/folder.rs +++ b/yazi-core/src/tab/folder.rs @@ -1,6 +1,6 @@ use ratatui::layout::Rect; use yazi_config::MANAGER; -use yazi_shared::Url; +use yazi_shared::fs::Url; use crate::{emit, files::{File, Files, FilesOp}, Step}; diff --git a/yazi-core/src/tab/tab.rs b/yazi-core/src/tab/tab.rs index 393fb714..48133902 100644 --- a/yazi-core/src/tab/tab.rs +++ b/yazi-core/src/tab/tab.rs @@ -2,7 +2,7 @@ use std::{borrow::Cow, collections::BTreeMap}; use anyhow::Result; use tokio::task::JoinHandle; -use yazi_shared::Url; +use yazi_shared::fs::Url; use super::{Backstack, Config, Finder, Folder, Mode}; use crate::{files::File, preview::{Preview, PreviewLock}}; diff --git a/yazi-core/src/tasks/commands/inspect.rs b/yazi-core/src/tasks/commands/inspect.rs index 6649a6e8..f27c8295 100644 --- a/yazi-core/src/tasks/commands/inspect.rs +++ b/yazi-core/src/tasks/commands/inspect.rs @@ -3,7 +3,7 @@ use std::io::{stdout, Write}; use crossterm::terminal::{disable_raw_mode, enable_raw_mode}; use tokio::{io::{stdin, AsyncReadExt}, select, sync::mpsc, time}; use yazi_config::keymap::Exec; -use yazi_shared::{Defer, Term}; +use yazi_shared::{term::Term, Defer}; use crate::{emit, tasks::Tasks, Event, BLOCKER}; diff --git a/yazi-core/src/tasks/scheduler.rs b/yazi-core/src/tasks/scheduler.rs index f5499136..3f7d70f7 100644 --- a/yazi-core/src/tasks/scheduler.rs +++ b/yazi-core/src/tasks/scheduler.rs @@ -4,7 +4,7 @@ use futures::{future::BoxFuture, FutureExt}; use parking_lot::RwLock; use tokio::{fs, select, sync::{mpsc::{self, UnboundedReceiver}, oneshot}, time::sleep}; use yazi_config::{open::Opener, TASKS}; -use yazi_shared::{unique_path, Throttle, Url}; +use yazi_shared::{fs::Url, unique_path, Throttle}; use super::{workers::{File, FileOpDelete, FileOpLink, FileOpPaste, FileOpTrash, Precache, PrecacheOpMime, PrecacheOpSize, Process, ProcessOpOpen}, Running, TaskOp, TaskStage, TasksProgress}; use crate::emit; diff --git a/yazi-core/src/tasks/tasks.rs b/yazi-core/src/tasks/tasks.rs index 765f69c0..f94ed465 100644 --- a/yazi-core/src/tasks/tasks.rs +++ b/yazi-core/src/tasks/tasks.rs @@ -3,7 +3,7 @@ use std::{collections::{BTreeMap, HashMap, HashSet}, ffi::OsStr, path::Path, syn use serde::Serialize; use tracing::debug; use yazi_config::{manager::SortBy, open::Opener, popup::InputOpt, OPEN}; -use yazi_shared::{MimeKind, Term, Url}; +use yazi_shared::{fs::Url, term::Term, MimeKind}; use super::{running::Running, task::TaskSummary, Scheduler, TASKS_PADDING, TASKS_PERCENT}; use crate::{emit, files::{File, Files}}; diff --git a/yazi-core/src/tasks/workers/file.rs b/yazi-core/src/tasks/workers/file.rs index 8239d967..ba3a181a 100644 --- a/yazi-core/src/tasks/workers/file.rs +++ b/yazi-core/src/tasks/workers/file.rs @@ -5,7 +5,7 @@ use futures::{future::BoxFuture, FutureExt}; use tokio::{fs, io::{self, ErrorKind::{AlreadyExists, NotFound}}, sync::mpsc}; use tracing::warn; use yazi_config::TASKS; -use yazi_shared::{calculate_size, copy_with_progress, path_relative_to, Url}; +use yazi_shared::{fs::{calculate_size, copy_with_progress, Url}, path_relative_to}; use crate::tasks::TaskOp; diff --git a/yazi-core/src/tasks/workers/precache.rs b/yazi-core/src/tasks/workers/precache.rs index abe6fe71..cd59c16e 100644 --- a/yazi-core/src/tasks/workers/precache.rs +++ b/yazi-core/src/tasks/workers/precache.rs @@ -5,7 +5,7 @@ use parking_lot::Mutex; use tokio::{fs, sync::mpsc}; use yazi_adaptor::Image; use yazi_config::PREVIEW; -use yazi_shared::{calculate_size, Throttle, Url}; +use yazi_shared::{fs::{calculate_size, Url}, Throttle}; use crate::{emit, external, files::FilesOp, tasks::TaskOp}; diff --git a/yazi-fm/src/app.rs b/yazi-fm/src/app.rs index b34584e5..aabe8c61 100644 --- a/yazi-fm/src/app.rs +++ b/yazi-fm/src/app.rs @@ -6,7 +6,7 @@ use ratatui::{backend::Backend, prelude::Rect}; use tokio::sync::oneshot; use yazi_config::{keymap::{Exec, Key, KeymapLayer}, BOOT}; use yazi_core::{emit, files::FilesOp, input::InputMode, manager::Manager, preview::COLLISION, Ctx, Event}; -use yazi_shared::Term; +use yazi_shared::term::Term; use crate::{Executor, Logs, Panic, Root, Signals}; diff --git a/yazi-fm/src/input/input.rs b/yazi-fm/src/input/input.rs index bf779176..c1858fa7 100644 --- a/yazi-fm/src/input/input.rs +++ b/yazi-fm/src/input/input.rs @@ -4,7 +4,7 @@ use ansi_to_tui::IntoText; use ratatui::{buffer::Buffer, layout::Rect, text::{Line, Text}, widgets::{Block, BorderType, Borders, Paragraph, Widget}}; use yazi_config::THEME; use yazi_core::{input::InputMode, Ctx}; -use yazi_shared::Term; +use yazi_shared::term::Term; use crate::widgets; diff --git a/yazi-fm/src/panic.rs b/yazi-fm/src/panic.rs index dc870f6f..508fd77b 100644 --- a/yazi-fm/src/panic.rs +++ b/yazi-fm/src/panic.rs @@ -1,4 +1,4 @@ -use yazi_shared::Term; +use yazi_shared::term::Term; pub(super) struct Panic; diff --git a/yazi-plugin/src/bindings/files.rs b/yazi-plugin/src/bindings/files.rs index 99bdfb67..803e1aeb 100644 --- a/yazi-plugin/src/bindings/files.rs +++ b/yazi-plugin/src/bindings/files.rs @@ -76,7 +76,7 @@ impl Files { reg.add_method("permissions", |_, me, ()| { Ok( #[cfg(unix)] - Some(yazi_shared::permissions(me.permissions)), + Some(yazi_shared::fs::permissions(me.permissions)), #[cfg(windows)] None::, ) diff --git a/yazi-plugin/src/bindings/shared.rs b/yazi-plugin/src/bindings/shared.rs index 96e39120..348c96ef 100644 --- a/yazi-plugin/src/bindings/shared.rs +++ b/yazi-plugin/src/bindings/shared.rs @@ -18,10 +18,10 @@ where } // --- Url -pub struct Url(yazi_shared::Url); +pub struct Url(yazi_shared::fs::Url); -impl From<&yazi_shared::Url> for Url { - fn from(value: &yazi_shared::Url) -> Self { Self(value.clone()) } +impl From<&yazi_shared::fs::Url> for Url { + fn from(value: &yazi_shared::fs::Url) -> Self { Self(value.clone()) } } impl UserData for Url { diff --git a/yazi-shared/src/cha.rs b/yazi-shared/src/fs/cha.rs similarity index 100% rename from yazi-shared/src/cha.rs rename to yazi-shared/src/fs/cha.rs diff --git a/yazi-shared/src/fs.rs b/yazi-shared/src/fs/fs.rs similarity index 100% rename from yazi-shared/src/fs.rs rename to yazi-shared/src/fs/fs.rs diff --git a/yazi-shared/src/fs/mod.rs b/yazi-shared/src/fs/mod.rs new file mode 100644 index 00000000..cb9c23e3 --- /dev/null +++ b/yazi-shared/src/fs/mod.rs @@ -0,0 +1,7 @@ +mod cha; +mod fs; +mod url; + +pub use cha::*; +pub use fs::*; +pub use url::*; diff --git a/yazi-shared/src/url.rs b/yazi-shared/src/fs/url.rs similarity index 100% rename from yazi-shared/src/url.rs rename to yazi-shared/src/fs/url.rs diff --git a/yazi-shared/src/lib.rs b/yazi-shared/src/lib.rs index 1edcaaa2..344db02b 100644 --- a/yazi-shared/src/lib.rs +++ b/yazi-shared/src/lib.rs @@ -1,33 +1,27 @@ #![allow(clippy::option_map_unit_fn)] -mod cha; mod chars; mod debounce; mod defer; mod errors; mod fns; -mod fs; +pub mod fs; mod mime; mod natsort; mod path; mod ro_cell; -mod term; +pub mod term; mod throttle; mod time; -mod url; -pub use cha::*; pub use chars::*; pub use debounce::*; pub use defer::*; pub use errors::*; pub use fns::*; -pub use fs::*; pub use mime::*; pub use natsort::*; pub use path::*; pub use ro_cell::*; -pub use term::*; pub use throttle::*; pub use time::*; -pub use url::*; diff --git a/yazi-shared/src/path.rs b/yazi-shared/src/path.rs index eadf83cf..da57046f 100644 --- a/yazi-shared/src/path.rs +++ b/yazi-shared/src/path.rs @@ -2,7 +2,7 @@ use std::{borrow::Cow, env, ffi::OsString, path::{Component, Path, PathBuf, MAIN use tokio::fs; -use crate::Url; +use crate::fs::Url; #[inline] pub fn current_cwd() -> Option { diff --git a/yazi-shared/src/term/cursor.rs b/yazi-shared/src/term/cursor.rs index ba1237a2..ed08737c 100644 --- a/yazi-shared/src/term/cursor.rs +++ b/yazi-shared/src/term/cursor.rs @@ -3,7 +3,7 @@ use std::io::{stdout, Write}; use anyhow::Result; use crossterm::{cursor::{MoveTo, RestorePosition, SavePosition, SetCursorStyle}, execute, queue}; -use crate::Term; +use super::Term; impl Term { #[inline]