mirror of
https://github.com/sharkdp/fd.git
synced 2024-09-28 13:01:30 +02:00
rename module entry -> dir_entry
This commit is contained in:
parent
1153e3e155
commit
3dc61b5f28
@ -2,7 +2,7 @@ use std::sync::{Arc, Mutex};
|
|||||||
|
|
||||||
use crossbeam_channel::Receiver;
|
use crossbeam_channel::Receiver;
|
||||||
|
|
||||||
use crate::entry::DirEntry;
|
use crate::dir_entry::DirEntry;
|
||||||
use crate::error::print_error;
|
use crate::error::print_error;
|
||||||
use crate::exit_codes::{merge_exitcodes, ExitCode};
|
use crate::exit_codes::{merge_exitcodes, ExitCode};
|
||||||
use crate::walk::WorkerResult;
|
use crate::walk::WorkerResult;
|
||||||
|
@ -9,7 +9,7 @@ use std::path::{Path, PathBuf};
|
|||||||
|
|
||||||
use normpath::PathExt;
|
use normpath::PathExt;
|
||||||
|
|
||||||
use crate::entry;
|
use crate::dir_entry;
|
||||||
|
|
||||||
pub fn path_absolute_form(path: &Path) -> io::Result<PathBuf> {
|
pub fn path_absolute_form(path: &Path) -> io::Result<PathBuf> {
|
||||||
if path.is_absolute() {
|
if path.is_absolute() {
|
||||||
@ -51,7 +51,7 @@ pub fn is_executable(_: &fs::Metadata) -> bool {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_empty(entry: &entry::DirEntry) -> bool {
|
pub fn is_empty(entry: &dir_entry::DirEntry) -> bool {
|
||||||
if let Some(file_type) = entry.file_type() {
|
if let Some(file_type) = entry.file_type() {
|
||||||
if file_type.is_dir() {
|
if file_type.is_dir() {
|
||||||
if let Ok(mut entries) = fs::read_dir(entry.path()) {
|
if let Ok(mut entries) = fs::read_dir(entry.path()) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::entry;
|
use crate::dir_entry;
|
||||||
use crate::filesystem;
|
use crate::filesystem;
|
||||||
|
|
||||||
/// Whether or not to show
|
/// Whether or not to show
|
||||||
@ -14,7 +14,7 @@ pub struct FileTypes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl FileTypes {
|
impl FileTypes {
|
||||||
pub fn should_ignore(&self, entry: &entry::DirEntry) -> bool {
|
pub fn should_ignore(&self, entry: &dir_entry::DirEntry) -> bool {
|
||||||
if let Some(ref entry_type) = entry.file_type() {
|
if let Some(ref entry_type) = entry.file_type() {
|
||||||
(!self.files && entry_type.is_file())
|
(!self.files && entry_type.is_file())
|
||||||
|| (!self.directories && entry_type.is_dir())
|
|| (!self.directories && entry_type.is_dir())
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
mod app;
|
mod app;
|
||||||
mod config;
|
mod config;
|
||||||
mod entry;
|
mod dir_entry;
|
||||||
mod error;
|
mod error;
|
||||||
mod exec;
|
mod exec;
|
||||||
mod exit_codes;
|
mod exit_codes;
|
||||||
|
@ -6,7 +6,7 @@ use lscolors::{Indicator, LsColors, Style};
|
|||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
use crate::entry::DirEntry;
|
use crate::dir_entry::DirEntry;
|
||||||
use crate::error::print_error;
|
use crate::error::print_error;
|
||||||
use crate::exit_codes::ExitCode;
|
use crate::exit_codes::ExitCode;
|
||||||
use crate::filesystem::strip_current_dir;
|
use crate::filesystem::strip_current_dir;
|
||||||
|
@ -15,7 +15,7 @@ use ignore::{self, WalkBuilder};
|
|||||||
use regex::bytes::Regex;
|
use regex::bytes::Regex;
|
||||||
|
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
use crate::entry::DirEntry;
|
use crate::dir_entry::DirEntry;
|
||||||
use crate::error::print_error;
|
use crate::error::print_error;
|
||||||
use crate::exec;
|
use crate::exec;
|
||||||
use crate::exit_codes::{merge_exitcodes, ExitCode};
|
use crate::exit_codes::{merge_exitcodes, ExitCode};
|
||||||
|
Loading…
Reference in New Issue
Block a user