repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/drivers/kgp_old.rs
yazi-adapter/src/drivers/kgp_old.rs
use core::str; use std::{io::Write, path::PathBuf}; use anyhow::Result; use base64::{Engine, engine::general_purpose}; use image::DynamicImage; use ratatui::layout::Rect; use yazi_term::tty::TTY; use crate::{CLOSE, ESCAPE, Emulator, Image, START, adapter::Adapter}; pub(crate) struct KgpOld; impl KgpOld { pub(crate...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/drivers/sixel.rs
yazi-adapter/src/drivers/sixel.rs
use std::{io::Write, path::PathBuf}; use anyhow::{Result, bail}; use crossterm::{cursor::MoveTo, queue}; use image::{DynamicImage, GenericImageView, RgbImage}; use palette::{Srgb, cast::ComponentsAs}; use quantette::{PaletteSize, color_map::IndexedColorMap, wu::{BinnerU8x3, WuU8x3}}; use ratatui::layout::Rect; use cr...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/drivers/mod.rs
yazi-adapter/src/drivers/mod.rs
yazi_macro::mod_flat!(chafa iip kgp kgp_old sixel ueberzug);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/drivers/kgp.rs
yazi-adapter/src/drivers/kgp.rs
use core::str; use std::{io::Write, path::PathBuf}; use anyhow::Result; use base64::{Engine, engine::general_purpose}; use crossterm::{cursor::MoveTo, queue}; use image::DynamicImage; use ratatui::layout::Rect; use yazi_shared::SyncCell; use crate::{CLOSE, ESCAPE, Emulator, START, adapter::Adapter, image::Image}; st...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-adapter/src/drivers/chafa.rs
yazi-adapter/src/drivers/chafa.rs
use std::{io::Write, path::PathBuf, process::Stdio}; use ansi_to_tui::IntoText; use anyhow::{Result, bail}; use crossterm::{cursor::MoveTo, queue}; use ratatui::layout::Rect; use tokio::process::Command; use crate::{Adapter, Emulator}; pub(crate) struct Chafa; impl Chafa { pub(crate) async fn image_show(path: Path...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-codegen/src/lib.rs
yazi-codegen/src/lib.rs
use proc_macro::TokenStream; use quote::{format_ident, quote}; use syn::{Attribute, Data, DeriveInput, Fields, parse_macro_input}; #[proc_macro_derive(DeserializeOver1)] pub fn deserialize_over1(input: TokenStream) -> TokenStream { // Parse the input tokens into a syntax tree let input = parse_macro_input!(input as ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/ser.rs
yazi-sftp/src/ser.rs
use serde::ser::{SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant, SerializeTuple, SerializeTupleStruct, SerializeTupleVariant}; use crate::Error; pub(super) struct Serializer { pub(super) output: Vec<u8>, } impl<'a> serde::Serializer for &'a mut Serializer { type Error = crate::Error; type Ok ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/path.rs
yazi-sftp/src/path.rs
use std::{borrow::Cow, ops::Deref}; use serde::{Deserialize, Serialize}; #[derive(Debug)] pub enum SftpPath<'a> { Borrowed(&'a typed_path::UnixPath), Owned(typed_path::UnixPathBuf), } impl Deref for SftpPath<'_> { type Target = typed_path::UnixPath; fn deref(&self) -> &Self::Target { match self { SftpPath:...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/packet.rs
yazi-sftp/src/packet.rs
use serde::{Deserialize, Serialize}; use super::de::Deserializer; use crate::{Error, impl_from_packet, impl_try_from_packet, requests, responses}; #[derive(Debug, Deserialize, Serialize)] #[serde(untagged)] pub enum Packet<'a> { Init(requests::Init), Open(requests::Open<'a>), Close(requests::Close<'a>), Read(requ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/lib.rs
yazi-sftp/src/lib.rs
pub mod fs; pub mod requests; pub mod responses; mod de; mod error; mod id; mod macros; mod operator; mod packet; mod path; mod receiver; mod ser; mod session; pub(crate) use de::*; pub use error::*; pub(crate) use id::*; pub use operator::*; pub use packet::*; pub use path::*; pub use receiver::*; pub(crate) use ser...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/session.rs
yazi-sftp/src/session.rs
use std::{any::TypeId, collections::HashMap, io::{self, ErrorKind}, sync::Arc, time::Duration}; use parking_lot::Mutex; use russh::{ChannelStream, client::Msg}; use serde::Serialize; use tokio::{io::{AsyncReadExt, AsyncWriteExt, ReadHalf, WriteHalf}, select, sync::{mpsc, oneshot}}; use crate::{Error, Id, Packet, Rece...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/id.rs
yazi-sftp/src/id.rs
use std::sync::atomic::{AtomicU32, Ordering}; pub(super) struct Id(AtomicU32); impl Default for Id { fn default() -> Self { Self(AtomicU32::new(1)) } } impl Id { pub(super) fn next(&self) -> u32 { loop { let old = self.0.fetch_add(1, Ordering::Relaxed); if old != 0 { return old; } } } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/error.rs
yazi-sftp/src/error.rs
use std::borrow::Cow; use crate::responses; #[derive(Debug)] pub enum Error { IO(std::io::Error), Serde(Cow<'static, str>), Status(responses::Status), Packet(&'static str), Timeout, Unsupported, Custom(Cow<'static, str>), } impl Error { pub(super) fn serde(s: impl Into<Cow<'static, str>>) -> Self { Self::Ser...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/operator.rs
yazi-sftp/src/operator.rs
use std::{ops::Deref, sync::Arc}; use russh::{ChannelStream, client::Msg}; use typed_path::UnixPathBuf; use crate::{AsSftpPath, Error, Receiver, Session, SftpPath, fs::{Attrs, File, Flags, ReadDir}, requests, responses}; pub struct Operator(Arc<Session>); impl Deref for Operator { type Target = Arc<Session>; fn ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/macros.rs
yazi-sftp/src/macros.rs
#[macro_export] macro_rules! impl_from_packet { ($($variant:ident($type:ty)),* $(,)?) => { $( impl<'a> From<$type> for $crate::Packet<'a> { fn from(value: $type) -> Self { Self::$variant(value) } } )* }; } #[macro_export] macro_rules! impl_try_from_packet { ($($variant:ident($type:ty)),* $(,)...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/receiver.rs
yazi-sftp/src/receiver.rs
use std::{pin::Pin, sync::Arc, task::Poll}; use tokio::sync::oneshot; use crate::{Packet, Session}; pub struct Receiver { rx: oneshot::Receiver<Packet<'static>>, received: bool, session: Arc<Session>, id: u32, } impl Drop for Receiver { fn drop(&mut self) { if !self.received { self.session.cal...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/de.rs
yazi-sftp/src/de.rs
use serde::{Deserializer as _, de::{EnumAccess, MapAccess, SeqAccess, VariantAccess, value::U32Deserializer}}; use crate::Error; pub(super) struct Deserializer<'a> { input: &'a [u8], } impl<'a> Deserializer<'a> { pub(super) fn once<'de, T>(input: &'de [u8]) -> Result<T, Error> where T: serde::Deserialize<'de>, ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/open.rs
yazi-sftp/src/requests/open.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath, fs::{Attrs, Flags}}; #[derive(Debug, Deserialize, Serialize)] pub struct Open<'a> { pub id: u32, pub path: SftpPath<'a>, pub flags: Flags, pub attrs: Cow<'a, Attrs>, } impl<'a> Open<'a> { pub fn new<P>(path: P, fla...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/rmdir.rs
yazi-sftp/src/requests/rmdir.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Rmdir<'a> { pub id: u32, pub path: SftpPath<'a>, } impl<'a> Rmdir<'a> { pub fn new<P>(path: P) -> Self where P: AsSftpPath<'a>, { Self { id: 0, path: path.as_sftp_path() } } pub f...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/mkdir.rs
yazi-sftp/src/requests/mkdir.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath, fs::Attrs}; #[derive(Debug, Deserialize, Serialize)] pub struct Mkdir<'a> { pub id: u32, pub path: SftpPath<'a>, pub attrs: Attrs, } impl<'a> Mkdir<'a> { pub fn new<P>(path: P, attrs: Attrs) -> Self where P: AsSftpPath<'a>, { Self {...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/write.rs
yazi-sftp/src/requests/write.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Write<'a> { pub id: u32, pub handle: Cow<'a, str>, pub offset: u64, pub data: Cow<'a, [u8]>, } impl Write<'_> { pub fn new<'a, H, D>(handle: H, offset: u64, data: D) -> Write<'a> where H: Into...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/symlink.rs
yazi-sftp/src/requests/symlink.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Symlink<'a> { pub id: u32, pub link: SftpPath<'a>, pub original: SftpPath<'a>, } impl<'a> Symlink<'a> { pub fn new<L, O>(link: L, original: O) -> Self where L: AsSftpPath<'a>, ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/stat.rs
yazi-sftp/src/requests/stat.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Stat<'a> { pub id: u32, pub path: SftpPath<'a>, } impl<'a> Stat<'a> { pub fn new<P>(path: P) -> Self where P: AsSftpPath<'a>, { Self { id: 0, path: path.as_sftp_path() } } pub fn ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/rename.rs
yazi-sftp/src/requests/rename.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Rename<'a> { pub id: u32, pub from: SftpPath<'a>, pub to: SftpPath<'a>, } impl<'a> Rename<'a> { pub fn new<F, T>(from: F, to: T) -> Self where F: AsSftpPath<'a>, T: AsSftpPath<'a>,...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/realpath.rs
yazi-sftp/src/requests/realpath.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Realpath<'a> { pub id: u32, pub path: SftpPath<'a>, } impl<'a> Realpath<'a> { pub fn new<P>(path: P) -> Self where P: AsSftpPath<'a>, { Self { id: 0, path: path.as_sftp_path() } } ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/set_stat.rs
yazi-sftp/src/requests/set_stat.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath, fs::Attrs}; #[derive(Debug, Deserialize, Serialize)] pub struct SetStat<'a> { pub id: u32, pub path: SftpPath<'a>, pub attrs: Attrs, } impl<'a> SetStat<'a> { pub fn new<P>(path: P, attrs: Attrs) -> Self where P: ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/mod.rs
yazi-sftp/src/requests/mod.rs
mod close; mod extended; mod fstat; mod init; mod lstat; mod mkdir; mod open; mod open_dir; mod read; mod read_dir; mod readlink; mod realpath; mod remove; mod rename; mod rmdir; mod set_stat; mod stat; mod symlink; mod write; pub use close::*; pub use extended::*; pub use fstat::*; pub use init::*; pub use lstat::*; ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/fstat.rs
yazi-sftp/src/requests/fstat.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Fstat<'a> { pub id: u32, pub handle: Cow<'a, str>, } impl<'a> Fstat<'a> { pub fn new(handle: impl Into<Cow<'a, str>>) -> Self { Self { id: 0, handle: handle.into() } } pub fn len(&self) -> usize { ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/init.rs
yazi-sftp/src/requests/init.rs
use std::collections::HashMap; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Init { pub version: u32, pub extensions: HashMap<String, String>, } impl Init { pub fn new(extensions: HashMap<String, String>) -> Self { Self { version: 3, extensions } } pub fn len(&self)...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/readlink.rs
yazi-sftp/src/requests/readlink.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Readlink<'a> { pub id: u32, pub path: SftpPath<'a>, } impl<'a> Readlink<'a> { pub fn new<P>(path: P) -> Self where P: AsSftpPath<'a>, { Self { id: 0, path: path.as_sftp_path() } } ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/read.rs
yazi-sftp/src/requests/read.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Read<'a> { pub id: u32, pub handle: Cow<'a, str>, pub offset: u64, pub len: u32, } impl<'a> Read<'a> { pub fn new<H>(handle: H, offset: u64, len: u32) -> Self where H: Into<Cow<'a, str>>, { ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/open_dir.rs
yazi-sftp/src/requests/open_dir.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct OpenDir<'a> { pub id: u32, pub path: SftpPath<'a>, } impl<'a> OpenDir<'a> { pub fn new<P>(path: P) -> Self where P: AsSftpPath<'a>, { Self { id: 0, path: path.as_sftp_path() } } p...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/read_dir.rs
yazi-sftp/src/requests/read_dir.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct ReadDir<'a> { pub id: u32, pub handle: Cow<'a, str>, } impl<'a> ReadDir<'a> { pub fn new(handle: &'a str) -> Self { Self { id: 0, handle: handle.into() } } pub fn len(&self) -> usize { size_of_val(...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/remove.rs
yazi-sftp/src/requests/remove.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Remove<'a> { pub id: u32, pub path: SftpPath<'a>, } impl<'a> Remove<'a> { pub fn new<P>(path: P) -> Self where P: AsSftpPath<'a>, { Self { id: 0, path: path.as_sftp_path() } } pub...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/extended.rs
yazi-sftp/src/requests/extended.rs
use std::{borrow::Cow, fmt::Debug}; use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Extended<'a, D> { pub id: u32, pub request: Cow<'a, str>, pub data: D, } impl<D: ExtendedData> Extended<'_, D> { pub fn new<'a, R>(request: R, d...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/close.rs
yazi-sftp/src/requests/close.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Close<'a> { pub id: u32, pub handle: Cow<'a, str>, } impl<'a> Close<'a> { pub fn new(handle: impl Into<Cow<'a, str>>) -> Self { Self { id: 0, handle: handle.into() } } pub fn len(&self) -> usize { ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/requests/lstat.rs
yazi-sftp/src/requests/lstat.rs
use serde::{Deserialize, Serialize}; use crate::{AsSftpPath, SftpPath}; #[derive(Debug, Deserialize, Serialize)] pub struct Lstat<'a> { pub id: u32, pub path: SftpPath<'a>, } impl Lstat<'_> { pub fn new<'a, P>(path: P) -> Lstat<'a> where P: AsSftpPath<'a>, { Lstat { id: 0, path: path.as_sftp_path() } } ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/fs/attrs.rs
yazi-sftp/src/fs/attrs.rs
use std::{collections::HashMap, fmt}; use serde::{Deserialize, Deserializer, Serialize, de::Visitor, ser::SerializeStruct}; #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct Attrs { pub size: Option<u64>, pub uid: Option<u32>, pub gid: Option<u32>, pub perm: Option<u32>, pub atime: ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/fs/flags.rs
yazi-sftp/src/fs/flags.rs
use bitflags::bitflags; use serde::{Deserialize, Serialize}; #[derive(Clone, Copy, Debug, Default, Deserialize, Serialize)] pub struct Flags(u32); bitflags! { impl Flags: u32 { const READ = 0b000001; const WRITE = 0b000010; const APPEND = 0b000100; const CREATE = 0b001000; const TRUNCATE = 0b010...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/fs/file.rs
yazi-sftp/src/fs/file.rs
use std::{io::{self, SeekFrom}, pin::Pin, sync::Arc, task::{Context, Poll, ready}, time::Duration}; use tokio::{io::{AsyncRead, AsyncSeek, AsyncWrite, ReadBuf}, time::{Timeout, timeout}}; use crate::{Error, Operator, Packet, Receiver, Session, fs::Attrs, requests}; pub struct File { session: Arc<Session>, handle:...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/fs/dir_entry.rs
yazi-sftp/src/fs/dir_entry.rs
use std::sync::Arc; use typed_path::UnixPathBuf; use crate::fs::Attrs; pub struct DirEntry { pub(super) dir: Arc<typed_path::UnixPathBuf>, pub(super) name: Vec<u8>, pub(super) long_name: Vec<u8>, pub(super) attrs: Attrs, } impl DirEntry { #[must_use] pub fn path(&self) -> UnixPathBuf { self.dir...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/fs/mod.rs
yazi-sftp/src/fs/mod.rs
mod attrs; mod dir_entry; mod file; mod flags; mod read_dir; pub use attrs::*; pub use dir_entry::*; pub use file::*; pub use flags::*; pub use read_dir::*;
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/fs/read_dir.rs
yazi-sftp/src/fs/read_dir.rs
use std::{mem, sync::Arc, time::Duration}; use crate::{Error, Operator, Session, SftpPath, fs::DirEntry, requests, responses}; pub struct ReadDir { session: Arc<Session>, dir: Arc<typed_path::UnixPathBuf>, handle: String, name: responses::Name<'static>, cursor: usize, done: bool, } impl Drop for Read...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/attrs.rs
yazi-sftp/src/responses/attrs.rs
use serde::{Deserialize, Serialize}; use crate::fs; #[derive(Debug, Deserialize, Serialize)] pub struct Attrs { pub id: u32, pub attrs: fs::Attrs, } impl Attrs { pub fn len(&self) -> usize { size_of_val(&self.id) + self.attrs.len() } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/version.rs
yazi-sftp/src/responses/version.rs
use std::collections::HashMap; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Version { pub version: u32, pub extensions: HashMap<String, String>, } impl Version { pub fn len(&self) -> usize { size_of_val(&self.version) + self.extensions.iter().map(|(k, v)| 4 + k....
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/status.rs
yazi-sftp/src/responses/status.rs
use serde::{Deserialize, Serialize}; use crate::Error; #[derive(Debug, Deserialize, Serialize)] pub struct Status { pub id: u32, pub code: StatusCode, pub message: String, pub language: String, } impl From<Status> for Result<(), Error> { fn from(status: Status) -> Self { if status.is_ok() { Ok(()) ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/mod.rs
yazi-sftp/src/responses/mod.rs
mod attrs; mod data; mod extended; mod handle; mod name; mod status; mod version; pub use attrs::*; pub use data::*; pub use extended::*; pub use handle::*; pub use name::*; pub use status::*; pub use version::*;
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/name.rs
yazi-sftp/src/responses/name.rs
use std::borrow::Cow; use serde::{Deserialize, Serialize}; use crate::fs::Attrs; #[derive(Debug, Default, Deserialize, Serialize)] pub struct Name<'a> { pub id: u32, pub items: Vec<NameItem<'a>>, } #[derive(Debug, Default, Deserialize, Serialize)] pub struct NameItem<'a> { pub name: Cow<'a, [u8]>, pub l...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/data.rs
yazi-sftp/src/responses/data.rs
use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Data { pub id: u32, pub data: Vec<u8>, } impl Data { pub fn len(&self) -> usize { size_of_val(&self.id) + 4 + self.data.len() } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/extended.rs
yazi-sftp/src/responses/extended.rs
use std::{borrow::Cow, fmt, ops::Deref}; use serde::{Deserialize, Serialize, de::Visitor, ser::SerializeSeq}; use crate::Error; #[derive(Debug, Deserialize, Serialize)] pub struct Extended<'a> { pub id: u32, pub data: ExtendedData<'a>, } impl<'a> Extended<'a> { pub fn len(&self) -> usize { size_of_val(&self.id...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-sftp/src/responses/handle.rs
yazi-sftp/src/responses/handle.rs
use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct Handle { pub id: u32, pub handle: String, } impl Handle { pub fn len(&self) -> usize { size_of_val(&self.id) + 4 + self.handle.len() } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/if.rs
yazi-term/src/if.rs
pub struct If<T: crossterm::Command>(pub bool, pub T); impl<T: crossterm::Command> crossterm::Command for If<T> { fn write_ansi(&self, f: &mut impl std::fmt::Write) -> std::fmt::Result { if self.0 { self.1.write_ansi(f) } else { Ok(()) } } #[cfg(windows)] fn execute_winapi(&self) -> std::io::Result<()> { if s...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/cursor.rs
yazi-term/src/cursor.rs
use std::sync::atomic::{AtomicBool, AtomicU8, Ordering}; use crossterm::cursor::SetCursorStyle; static SHAPE: AtomicU8 = AtomicU8::new(0); static BLINK: AtomicBool = AtomicBool::new(false); pub struct RestoreCursor; impl RestoreCursor { pub fn store(resp: &str) { SHAPE.store( resp .split_once("\x1bP1$r") ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/lib.rs
yazi-term/src/lib.rs
yazi_macro::mod_pub!(tty); yazi_macro::mod_flat!(background cursor r#if); pub fn init() { tty::init(); }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/background.rs
yazi-term/src/background.rs
pub struct SetBackground(pub bool, pub String); impl crossterm::Command for SetBackground { fn write_ansi(&self, f: &mut impl std::fmt::Write) -> std::fmt::Result { if self.1.is_empty() { Ok(()) } else if self.0 { write!(f, "\x1b]11;{}\x1b\\", self.1) } else { write!(f, "\x1b]111\x1b\\") } } #[cfg...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/tty/tty.rs
yazi-term/src/tty/tty.rs
use std::{io::{BufWriter, Error, ErrorKind, Read, Write}, time::{Duration, Instant}}; use parking_lot::{Mutex, MutexGuard}; use super::Handle; pub struct Tty { stdin: Mutex<Handle>, stdout: Mutex<BufWriter<Handle>>, } impl Default for Tty { fn default() -> Self { Self { stdin: Mutex::new(Handle::new(false...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/tty/windows.rs
yazi-term/src/tty/windows.rs
// Copied from https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/windows/stdio.rs use std::{mem::MaybeUninit, os::windows::io::RawHandle, str}; use windows_sys::Win32::{Globalization::{CP_UTF8, MB_ERR_INVALID_CHARS, MultiByteToWideChar}, System::Console::WriteConsoleW}; use yazi_shared::{floor_cha...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/tty/mod.rs
yazi-term/src/tty/mod.rs
yazi_macro::mod_flat!(handle tty); #[cfg(windows)] yazi_macro::mod_flat!(windows); pub static TTY: yazi_shared::RoCell<Tty> = yazi_shared::RoCell::new(); pub(super) fn init() { TTY.with(<_>::default); }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-term/src/tty/handle.rs
yazi-term/src/tty/handle.rs
use std::{io::{Error, ErrorKind, Read, Write}, time::Duration}; use tracing::error; pub struct Handle { #[cfg(unix)] inner: std::os::fd::RawFd, #[cfg(windows)] inner: std::os::windows::io::RawHandle, close: bool, #[cfg(windows)] out_utf8: bool, #[cfg(windows)] incomplete_...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-packing/src/lib.rs
yazi-packing/src/lib.rs
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/lib.rs
yazi-actor/src/lib.rs
extern crate self as yazi_actor; yazi_macro::mod_pub!(cmp confirm core help input lives mgr pick spot tasks which); yazi_macro::mod_flat!(actor context);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/actor.rs
yazi-actor/src/actor.rs
use anyhow::Result; use yazi_dds::spark::SparkKind; use yazi_shared::data::Data; use crate::Ctx; pub trait Actor { type Options; const NAME: &str; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data>; fn hook(_cx: &Ctx, _opt: &Self::Options) -> Option<SparkKind> { None } }
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/context.rs
yazi-actor/src/context.rs
use std::ops::{Deref, DerefMut}; use anyhow::{Result, anyhow}; use yazi_core::{Core, mgr::Tabs, tab::{Folder, Tab}, tasks::Tasks}; use yazi_fs::File; use yazi_shared::{Id, Source, event::Cmd, url::UrlBuf}; pub struct Ctx<'a> { pub core: &'a mut Core, pub tab: usize, pub level: usize, pub source: ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/arrow.rs
yazi-actor/src/tasks/arrow.rs
use anyhow::Result; use yazi_core::tasks::Tasks; use yazi_macro::{render, succ}; use yazi_parser::ArrowOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Arrow; impl Actor for Arrow { type Options = ArrowOpt; const NAME: &str = "arrow"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data>...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/open_shell_compat.rs
yazi-actor/src/tasks/open_shell_compat.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::tasks::ProcessOpenOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct OpenShellCompat; // TODO: remove impl Actor for OpenShellCompat { type Options = ProcessOpenOpt; const NAME: &str = "open_shell_compat"; fn act(cx: &mut Ctx, opt: Se...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/cancel.rs
yazi-actor/src/tasks/cancel.rs
use anyhow::Result; use yazi_macro::{act, render, succ}; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Cancel; impl Actor for Cancel { type Options = VoidOpt; const NAME: &str = "cancel"; fn act(cx: &mut Ctx, _: Self::Options) -> Result<Data> { let tasks = &mut cx....
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/update_succeed.rs
yazi-actor/src/tasks/update_succeed.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::tasks::UpdateSucceedOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct UpdateSucceed; impl Actor for UpdateSucceed { type Options = UpdateSucceedOpt; const NAME: &str = "update_succeed"; fn act(cx: &mut Ctx, opt: Self::Options) -> Res...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/process_open.rs
yazi-actor/src/tasks/process_open.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::tasks::ProcessOpenOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct ProcessOpen; impl Actor for ProcessOpen { type Options = ProcessOpenOpt; const NAME: &str = "process_open"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/mod.rs
yazi-actor/src/tasks/mod.rs
yazi_macro::mod_flat!(arrow cancel close open_shell_compat inspect process_open show update_succeed);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/show.rs
yazi-actor/src/tasks/show.rs
use anyhow::Result; use yazi_macro::{act, render, succ}; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Show; impl Actor for Show { type Options = VoidOpt; const NAME: &str = "show"; fn act(cx: &mut Ctx, _: Self::Options) -> Result<Data> { let tasks = &mut cx.tasks;...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/close.rs
yazi-actor/src/tasks/close.rs
use anyhow::Result; use yazi_macro::{act, render, succ}; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Close; impl Actor for Close { type Options = VoidOpt; const NAME: &str = "close"; fn act(cx: &mut Ctx, _: Self::Options) -> Result<Data> { let tasks = &mut cx.tas...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/tasks/inspect.rs
yazi-actor/src/tasks/inspect.rs
use std::io::Write; use anyhow::Result; use crossterm::{execute, terminal::{disable_raw_mode, enable_raw_mode}}; use scopeguard::defer; use tokio::{io::{AsyncReadExt, stdin}, select, sync::mpsc, time}; use yazi_binding::Permit; use yazi_macro::succ; use yazi_parser::VoidOpt; use yazi_proxy::{AppProxy, HIDER}; use yazi...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/help/filter.rs
yazi-actor/src/help/filter.rs
use anyhow::Result; use yazi_macro::{render, succ}; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Filter; impl Actor for Filter { type Options = VoidOpt; const NAME: &str = "filter"; fn act(cx: &mut Ctx, _: Self::Options) -> Result<Data> { let help = &mut cx.help; ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/help/arrow.rs
yazi-actor/src/help/arrow.rs
use anyhow::Result; use yazi_macro::{render, succ}; use yazi_parser::ArrowOpt; use yazi_shared::data::Data; use yazi_widgets::Scrollable; use crate::{Actor, Ctx}; pub struct Arrow; impl Actor for Arrow { type Options = ArrowOpt; const NAME: &str = "arrow"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/help/toggle.rs
yazi-actor/src/help/toggle.rs
use anyhow::Result; use yazi_macro::{render, succ}; use yazi_parser::help::ToggleOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Toggle; impl Actor for Toggle { type Options = ToggleOpt; const NAME: &str = "toggle"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> { let help = &m...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/help/mod.rs
yazi-actor/src/help/mod.rs
yazi_macro::mod_flat!(arrow escape filter toggle);
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/help/escape.rs
yazi-actor/src/help/escape.rs
use anyhow::Result; use yazi_macro::{act, render, succ}; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Escape; impl Actor for Escape { type Options = VoidOpt; const NAME: &str = "escape"; fn act(cx: &mut Ctx, _: Self::Options) -> Result<Data> { if cx.help.keyword()...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/open.rs
yazi-actor/src/mgr/open.rs
use anyhow::Result; use yazi_boot::ARGS; use yazi_fs::File; use yazi_macro::{act, succ}; use yazi_parser::mgr::{OpenDoOpt, OpenOpt}; use yazi_proxy::MgrProxy; use yazi_shared::data::Data; use yazi_vfs::VfsFile; use crate::{Actor, Ctx, mgr::Quit}; pub struct Open; impl Actor for Open { type Options = OpenOpt; cons...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/stash.rs
yazi-actor/src/mgr/stash.rs
use anyhow::Result; use yazi_dds::spark::SparkKind; use yazi_macro::succ; use yazi_parser::mgr::StashOpt; use yazi_shared::{Source, data::Data, url::{AsUrl, UrlLike}}; use crate::{Actor, Ctx}; pub struct Stash; impl Actor for Stash { type Options = StashOpt; const NAME: &str = "stash"; fn act(cx: &mut Ctx, opt:...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/update_mimes.rs
yazi-actor/src/mgr/update_mimes.rs
use anyhow::Result; use hashbrown::HashMap; use yazi_macro::{act, render, succ}; use yazi_parser::mgr::UpdateMimesOpt; use yazi_shared::{data::Data, pool::InternStr, url::{AsUrl, UrlCov}}; use yazi_watcher::local::LINKED; use crate::{Actor, Ctx}; pub struct UpdateMimes; impl Actor for UpdateMimes { type Options = U...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/link.rs
yazi-actor/src/mgr/link.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::mgr::LinkOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Link; impl Actor for Link { type Options = LinkOpt; const NAME: &str = "link"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> { let mgr = &mut cx.core.mgr; let ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/download.rs
yazi-actor/src/mgr/download.rs
use std::{mem, time::{Duration, Instant}}; use anyhow::Result; use futures::{StreamExt, stream::FuturesUnordered}; use hashbrown::HashSet; use yazi_fs::{File, FsScheme, provider::{Provider, local::Local}}; use yazi_macro::succ; use yazi_parser::mgr::{DownloadOpt, OpenOpt}; use yazi_proxy::MgrProxy; use yazi_shared::{d...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/suspend.rs
yazi-actor/src/mgr/suspend.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::VoidOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Suspend; impl Actor for Suspend { type Options = VoidOpt; const NAME: &str = "suspend"; fn act(_: &mut Ctx, _: Self::Options) -> Result<Data> { #[cfg(unix)] if !yazi_shared::s...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/yank.rs
yazi-actor/src/mgr/yank.rs
use anyhow::Result; use yazi_core::mgr::Yanked; use yazi_macro::{act, render}; use yazi_parser::mgr::YankOpt; use yazi_shared::{data::Data, url::UrlBufCov}; use crate::{Actor, Ctx}; pub struct Yank; impl Actor for Yank { type Options = YankOpt; const NAME: &str = "yank"; fn act(cx: &mut Ctx, opt: Self::Options)...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/hardlink.rs
yazi-actor/src/mgr/hardlink.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::mgr::HardlinkOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Hardlink; impl Actor for Hardlink { type Options = HardlinkOpt; const NAME: &str = "hardlink"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> { let mgr = &mut...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/cd.rs
yazi-actor/src/mgr/cd.rs
use std::{mem, time::Duration}; use anyhow::Result; use tokio::pin; use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream}; use yazi_config::popup::InputCfg; use yazi_dds::Pubsub; use yazi_fs::{File, FilesOp, path::{clean_url, expand_url}}; use yazi_macro::{act, err, render, succ}; use yazi_parser::mgr::CdOp...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/filter.rs
yazi-actor/src/mgr/filter.rs
use std::time::Duration; use anyhow::Result; use tokio::pin; use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream}; use yazi_config::popup::InputCfg; use yazi_macro::succ; use yazi_parser::mgr::FilterOpt; use yazi_proxy::{InputProxy, MgrProxy}; use yazi_shared::{Debounce, data::Data, errors::InputError}; u...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/update_spotted.rs
yazi-actor/src/mgr/update_spotted.rs
use anyhow::Result; use yazi_macro::{render, succ}; use yazi_parser::mgr::UpdateSpottedOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct UpdateSpotted; impl Actor for UpdateSpotted { type Options = UpdateSpottedOpt; const NAME: &str = "update_spotted"; fn act(cx: &mut Ctx, mut opt: Self::Opt...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/sort.rs
yazi-actor/src/mgr/sort.rs
use anyhow::Result; use yazi_core::tab::Folder; use yazi_dds::spark::SparkKind; use yazi_fs::{FilesSorter, FolderStage}; use yazi_macro::{act, render, render_and, succ}; use yazi_parser::mgr::SortOpt; use yazi_shared::{Source, data::Data}; use crate::{Actor, Ctx}; pub struct Sort; impl Actor for Sort { type Options...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/rename.rs
yazi-actor/src/mgr/rename.rs
use anyhow::Result; use yazi_config::popup::{ConfirmCfg, InputCfg}; use yazi_dds::Pubsub; use yazi_fs::{File, FilesOp}; use yazi_macro::{act, err, ok_or_not_found, succ}; use yazi_parser::mgr::RenameOpt; use yazi_proxy::{ConfirmProxy, InputProxy, MgrProxy}; use yazi_shared::{Id, data::Data, url::{UrlBuf, UrlLike}}; use...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/toggle_all.rs
yazi-actor/src/mgr/toggle_all.rs
use anyhow::Result; use yazi_macro::{render, succ}; use yazi_parser::mgr::ToggleAllOpt; use yazi_proxy::AppProxy; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct ToggleAll; impl Actor for ToggleAll { type Options = ToggleAllOpt; const NAME: &str = "toggle_all"; fn act(cx: &mut Ctx, opt: Self::O...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/tab_close.rs
yazi-actor/src/mgr/tab_close.rs
use anyhow::Result; use yazi_macro::{act, render, succ}; use yazi_parser::mgr::TabCloseOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct TabClose; impl Actor for TabClose { type Options = TabCloseOpt; const NAME: &str = "tab_close"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> { ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/arrow.rs
yazi-actor/src/mgr/arrow.rs
use anyhow::Result; use yazi_macro::{act, render, succ}; use yazi_parser::ArrowOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Arrow; impl Actor for Arrow { type Options = ArrowOpt; const NAME: &str = "arrow"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> { let tab = cx.tab_mu...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/peek.rs
yazi-actor/src/mgr/peek.rs
use anyhow::Result; use yazi_macro::succ; use yazi_parser::mgr::PeekOpt; use yazi_proxy::HIDER; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Peek; impl Actor for Peek { type Options = PeekOpt; const NAME: &str = "peek"; fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> { let Some(ho...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/open_do.rs
yazi-actor/src/mgr/open_do.rs
use anyhow::Result; use hashbrown::HashMap; use yazi_config::{YAZI, popup::PickCfg}; use yazi_fs::Splatter; use yazi_macro::succ; use yazi_parser::{mgr::OpenDoOpt, tasks::ProcessOpenOpt}; use yazi_proxy::{PickProxy, TasksProxy}; use yazi_shared::{data::Data, url::UrlCow}; use crate::{Actor, Ctx}; pub struct OpenDo; ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/update_files.rs
yazi-actor/src/mgr/update_files.rs
use anyhow::Result; use yazi_core::tab::Folder; use yazi_fs::FilesOp; use yazi_macro::{act, render, succ}; use yazi_parser::mgr::UpdateFilesOpt; use yazi_shared::{data::Data, url::UrlLike}; use yazi_watcher::local::LINKED; use crate::{Actor, Ctx}; pub struct UpdateFiles; impl Actor for UpdateFiles { type Options = ...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/filter_do.rs
yazi-actor/src/mgr/filter_do.rs
use anyhow::Result; use yazi_fs::Filter; use yazi_macro::{act, render, succ}; use yazi_parser::mgr::FilterOpt; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct FilterDo; impl Actor for FilterDo { type Options = FilterOpt; const NAME: &str = "filter_do"; fn act(cx: &mut Ctx, opt: Self::Options) -...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/toggle.rs
yazi-actor/src/mgr/toggle.rs
use anyhow::Result; use yazi_macro::{render_and, succ}; use yazi_parser::mgr::ToggleOpt; use yazi_proxy::AppProxy; use yazi_shared::{data::Data, url::UrlCow}; use crate::{Actor, Ctx}; pub struct Toggle; impl Actor for Toggle { type Options = ToggleOpt; const NAME: &str = "toggle"; fn act(cx: &mut Ctx, opt: Self...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/shell.rs
yazi-actor/src/mgr/shell.rs
use std::borrow::Cow; use anyhow::Result; use yazi_config::popup::InputCfg; use yazi_fs::Splatter; use yazi_macro::{act, succ}; use yazi_parser::{mgr::ShellOpt, tasks::ProcessOpenOpt}; use yazi_proxy::{InputProxy, TasksProxy}; use yazi_shared::data::Data; use crate::{Actor, Ctx}; pub struct Shell; impl Actor for Sh...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false
sxyazi/yazi
https://github.com/sxyazi/yazi/blob/3c39a326abaacb37d9ff15af7668756d60624dfa/yazi-actor/src/mgr/hover.rs
yazi-actor/src/mgr/hover.rs
use anyhow::Result; use yazi_dds::Pubsub; use yazi_macro::{err, render, succ, tab}; use yazi_parser::mgr::HoverOpt; use yazi_shared::{data::Data, url::UrlLike}; use crate::{Actor, Ctx}; pub struct Hover; impl Actor for Hover { type Options = HoverOpt; const NAME: &str = "hover"; fn act(cx: &mut Ctx, opt: Self::...
rust
MIT
3c39a326abaacb37d9ff15af7668756d60624dfa
2026-01-04T15:33:17.426354Z
false