Skip to content
Myr

Doc: add chinese readme link (#347)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by yobrave · committed by David Peter · parent 437bd11 · Browse files · 3 files+36 added−54 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+36 added−54 removed

  • other:+36 added−54 removed

3 files+36 added−54 removed

modified:src/internal/filter/time.rs+30 added-50 removed
40 unmodified lines
41 fn is_time_filter_applicable() {42 use humantime;4344 let ref_time = humantime::parse_rfc3339("2010-10-10T10:10:10Z").unwrap();45 assert!(46 TimeFilter::after(&ref_time, "1min")47 .unwrap()48 .applies_to(&ref_time)49 );50 assert!(51 !TimeFilter::before(&ref_time, "1min")52 .unwrap()53 .applies_to(&ref_time)54 );45 assert!(TimeFilter::after(&ref_time, "1min")46 .unwrap()47 .applies_to(&ref_time));48 assert!(!TimeFilter::before(&ref_time, "1min")49 .unwrap()50 .applies_to(&ref_time));5152 let t1m_ago = ref_time - Duration::from_secs(60);57 assert!(58 !TimeFilter::after(&ref_time, "30sec")59 .unwrap()60 .applies_to(&t1m_ago)61 );62 assert!(63 TimeFilter::after(&ref_time, "2min")64 .unwrap()65 .applies_to(&t1m_ago)66 );53 assert!(!TimeFilter::after(&ref_time, "30sec")54 .unwrap()55 .applies_to(&t1m_ago));56 assert!(TimeFilter::after(&ref_time, "2min")57 .unwrap()58 .applies_to(&t1m_ago));5968 assert!(69 TimeFilter::before(&ref_time, "30sec")70 .unwrap()71 .applies_to(&t1m_ago)72 );73 assert!(74 !TimeFilter::before(&ref_time, "2min")75 .unwrap()76 .applies_to(&t1m_ago)77 );60 assert!(TimeFilter::before(&ref_time, "30sec")61 .unwrap()62 .applies_to(&t1m_ago));63 assert!(!TimeFilter::before(&ref_time, "2min")64 .unwrap()65 .applies_to(&t1m_ago));6667 let t10s_before = "2010-10-10 10:10:00";80 assert!(81 !TimeFilter::before(&ref_time, t10s_before)82 .unwrap()83 .applies_to(&ref_time)84 );85 assert!(86 TimeFilter::before(&ref_time, t10s_before)87 .unwrap()88 .applies_to(&t1m_ago)89 );68 assert!(!TimeFilter::before(&ref_time, t10s_before)69 .unwrap()70 .applies_to(&ref_time));71 assert!(TimeFilter::before(&ref_time, t10s_before)72 .unwrap()73 .applies_to(&t1m_ago));7491 assert!(92 TimeFilter::after(&ref_time, t10s_before)93 .unwrap()94 .applies_to(&ref_time)95 );96 assert!(97 !TimeFilter::after(&ref_time, t10s_before)98 .unwrap()99 .applies_to(&t1m_ago)100 );75 assert!(TimeFilter::after(&ref_time, t10s_before)76 .unwrap()77 .applies_to(&ref_time));78 assert!(!TimeFilter::after(&ref_time, t10s_before)79 .unwrap()80 .applies_to(&t1m_ago));81 }82}
modified:src/walk.rs+5 added-4 removed
238 unmodified lines
239 if let Some(ref entry_type) = entry.file_type() {240 if (!file_types.files && entry_type.is_file())241 || (!file_types.directories && entry_type.is_dir())242 || (!file_types.symlinks && entry_type.is_symlink())243 || (file_types.executables_only243 || (file_types.executables_only && !entry244 .metadata()245 .map(|m| fshelper::is_executable(&m))246 .unwrap_or(false))244 && !entry245 .metadata()246 .map(|m| fshelper::is_executable(&m))247 .unwrap_or(false))248 || (file_types.empty_only && !fshelper::is_empty(&entry))249 {250 return ignore::WalkState::Continue;251 } else if !(entry_type.is_file()
97 unmodified lines
modified:README.md+1 added
1# fd2[![Build Status](https://travis-ci.org/sharkdp/fd.svg?branch=master)](https://travis-ci.org/sharkdp/fd)3[![Build status](https://ci.appveyor.com/api/projects/status/21c4p5fwggc5gy3j?svg=true)](https://ci.appveyor.com/project/sharkdp/fd)4[![Version info](https://img.shields.io/crates/v/fd-find.svg)](https://crates.io/crates/fd-find)5[中文](https://github.com/chinanf-boy/fd-zh)67*fd* is a simple, fast and user-friendly alternative to8[*find*](https://www.gnu.org/software/findutils/).9
443 unmodified lines