mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-28 02:35:03 +00:00
Use OS-defined permission bits type
This commit is contained in:
parent
ffcc6fa179
commit
42a347c063
@ -3,6 +3,7 @@ use std::env::current_dir;
|
||||
use std::fs;
|
||||
use std::io;
|
||||
use std::os::unix;
|
||||
use std::os::unix::raw::mode_t;
|
||||
use std::os::unix::fs::{MetadataExt, PermissionsExt};
|
||||
use std::path::{Component, Path, PathBuf};
|
||||
|
||||
@ -423,7 +424,7 @@ impl<'a> File<'a> {
|
||||
}
|
||||
|
||||
/// Helper method for the permissions string.
|
||||
fn permission_bit(bits: u16, bit: u16, character: &'static str, style: Style) -> ANSIString<'static> {
|
||||
fn permission_bit(bits: mode_t, bit: mode_t, character: &'static str, style: Style) -> ANSIString<'static> {
|
||||
let bi32 = bit as u16;
|
||||
if bits & bi32 == bi32 {
|
||||
style.paint(character)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#![feature(collections, convert, core, exit_status, file_type, fs_ext, fs_mode)]
|
||||
#![feature(libc, metadata_ext, scoped, symlink_metadata)]
|
||||
#![feature(libc, metadata_ext, raw_ext, scoped, symlink_metadata)]
|
||||
|
||||
extern crate ansi_term;
|
||||
extern crate datetime;
|
||||
|
Loading…
Reference in New Issue
Block a user