mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Changed display_symlink_count to use the right variable name. Removed dead code.
This commit is contained in:
parent
6e562faae1
commit
539da3ba1a
1 changed files with 2 additions and 25 deletions
27
src/ls/ls.rs
27
src/ls/ls.rs
|
@ -194,7 +194,7 @@ fn display_symlink_count(metadata: &Metadata) -> String {
|
|||
fn display_symlink_count(metadata: &Metadata) -> String {
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
|
||||
md.nlink().to_string()
|
||||
metadata.nlink().to_string()
|
||||
}
|
||||
|
||||
#[cfg(target_family = "windows")]
|
||||
|
@ -207,32 +207,9 @@ fn display_permissions(metadata: &Metadata) -> String {
|
|||
fn display_permissions(metadata: &Metadata) -> String {
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
|
||||
"lolwtfbbq".to_string();
|
||||
"xxxxxxxxx".to_string();
|
||||
}
|
||||
|
||||
|
||||
// fn list_directory_contents(directory: &Path, options: &getopts::Matches) {
|
||||
// let rd = fs::read_dir(directory);
|
||||
|
||||
// match rd {
|
||||
// Err(err) => println!("ERROR! {}", err),
|
||||
// Ok(entries) => display_directory_contents(entries, &options),
|
||||
// }
|
||||
// }
|
||||
|
||||
// fn display_directory_contents(contents: ReadDir, options: &getopts::Matches) {
|
||||
// for entry in contents {
|
||||
// let entry = match entry {
|
||||
// Err(err) => {
|
||||
// println!("ERROR! {}", err);
|
||||
// panic!()
|
||||
// },
|
||||
// Ok(en) => en
|
||||
// };
|
||||
// display_item(entry.path().as_path(), &options);
|
||||
// }
|
||||
// }
|
||||
|
||||
fn display_item(item: &Path, options: &getopts::Matches) {
|
||||
// let fileType = item.file
|
||||
// let mut fileMeta = String::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue